@quickback-dev/cli 0.11.1 → 0.13.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.
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,MAAM,WAAW,aAAa;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAMD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6K1D"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,MAAM,WAAW,aAAa;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAMD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAqL1D"}
@@ -50,10 +50,18 @@ export async function create(args) {
50
50
  const resolvedTemplateId = TEMPLATE_ALIASES[options.template] || options.template;
51
51
  const isSaas = resolvedTemplateId === "b2bsaas-cloudflare";
52
52
  const isBlog = resolvedTemplateId === "blog-cloudflare";
53
- const isEmpty = resolvedTemplateId === "empty-cloudflare" || resolvedTemplateId === "empty-bun";
53
+ const isTodos = resolvedTemplateId === "todos-cloudflare";
54
+ // The default `betterauth-d1-cloudflare` (and any non-example template)
55
+ // scaffolds NO example feature — users get a bare auth + DB scaffold
56
+ // and add their own definitions. The todos example is now opt-in via
57
+ // `quickback create todos <name>` so newcomers aren't forced to delete
58
+ // sample code before writing their own. `empty-*` is preserved as the
59
+ // explicit "no anything" path; the default path is now functionally
60
+ // equivalent but keeps the auth+D1 framing in its description.
61
+ const scaffoldsExample = isSaas || isBlog || isTodos;
54
62
  mkdirSync(targetDir, { recursive: true });
55
63
  mkdirSync(join(targetDir, "quickback"), { recursive: true });
56
- if (!isEmpty) {
64
+ if (scaffoldsExample) {
57
65
  const featureName = isSaas ? "projects" : isBlog ? "posts" : "todos";
58
66
  mkdirSync(join(targetDir, "quickback", "features", featureName), { recursive: true });
59
67
  }
@@ -70,7 +78,7 @@ export async function create(args) {
70
78
  else if (isBlog) {
71
79
  generateBlogFeature(targetDir);
72
80
  }
73
- else if (!isEmpty) {
81
+ else if (isTodos) {
74
82
  generateTodoFeature(targetDir);
75
83
  }
76
84
  generateAuthConfig(targetDir);
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAU,MAAM,IAAI,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EACH,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,gBAAgB,GAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,sB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AAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC,CAAC;IAC3E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC,CAAC;IACxE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC,CAAC;IACzE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC;AAED,SAAS,SAAS;IACd,OAAO,CAAC,GAAG,CAAC;EACd,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC;;EAE3B,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;;6CAE0B,EAAE,CAAC,IAAI,CAAC,kCAAkC,CAAC;;EAEtF,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;;6CAEuB,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;6CAClB,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC;;EAEzE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC;;;;;;;;;EASnB,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;EACrB,kBAAkB,EAAE;CACrB,CAAC,CAAC;AACH,CAAC"}
@@ -3,7 +3,7 @@
3
3
  export const DOCS = {
4
4
  "changelog": {
5
5
  "title": "Changelog",
6
- "content": "# Changelog\n\nRelease notes for the Quickback compiler, CLI, and platform.\n\n---\n\n## v0.11.1 — May 5, 2026\n\n### PartyServer auto-mount is now secure by default\n\nThe `/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.\n\nThe auto-mount now wraps `partyserverMiddleware` in an auth check: `401 Unauthorized` if the caller has no resolved auth context, otherwise the upgrade proceeds. The four auth mechanisms the rest of the worker honors (session cookie, JWT bearer, `x-api-key` header, `?api_key=` / `?key=` query) all unlock connections automatically.\n\nPer-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.\n\nNo 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.\n\n---\n\n## v0.11.0 — May 5, 2026\n\n### OAuth Provider plugin (MCP-ready)\n\nQuickback 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.\n\nThis replaces Better Auth's deprecated `mcp` plugin and gives every future MCP client (Cursor, Claude Desktop, claude.ai connectors, custom tooling) RFC 7591 dynamic client registration + the well-known discovery documents they need to bootstrap themselves. See [Auth Plugins → OAuth Provider](/stack/auth/plugins#oauth-provider-mcp-ready).\n\n### API key auth via query parameter\n\nThe auth middleware now accepts API keys as `?api_key=...` or `?key=...` query parameters in addition to the `x-api-key` header. The header takes precedence when both are sent. This unblocks clients that can't inject custom headers — most notably claude.ai's MCP connector, which previously returned zero tools because every list/call attempt was unauthenticated.\n\nThe query-param form lands in access logs and `Referer` headers; prefer the header whenever the client supports it. See [Auth Plugins → API Keys](/stack/auth/plugins#api-keys).\n\n### PartyServer rooms + realtime URL split (breaking)\n\nThe realtime URL space is reorganized so the names match what each primitive does:\n\n- **`/realtime/v1/*` → `/broadcast/v1/*`** — the existing org-wide Broadcaster (Postgres-changes fan-out, ws-ticket auth) moves to its semantically accurate prefix. Same code, same behavior, just a different mount point.\n- **`/realtime/<binding>/<room-id>` is the new mount for [PartyServer](/stack/realtime/partyserver-rooms) rooms** — bidirectional, per-room (per-document) Durable Objects with presence and lifecycle hooks. Auto-mounted via `hono-party` whenever a project declares any in-worker DO via `bindings.durableObjects[].from`. Use these for collaborative editing, live cursors, and per-room state.\n\n**Breaking changes** — recompile + redeploy required:\n\n- The `REALTIME_URL` runtime env var is renamed to `BROADCAST_URL` (used by the org member-update broadcast hook in separate-mode realtime). If you set this via `wrangler secret put REALTIME_URL`, re-set it as `BROADCAST_URL`.\n- The auth-ui SPA helpers `getRealtimeWsUrl()` / `getRealtimeTicketUrl()` are renamed to `getBroadcastWsUrl()` / `getBroadcastTicketUrl()`. The `appConfig.routes.api.realtime` field is renamed to `appConfig.routes.api.broadcast`.\n- WebSocket subscribers that hardcoded `/realtime/v1/websocket` or `/realtime/v1/ws-ticket` need to be updated to `/broadcast/v1/...`. The bundled CMS and Account SPAs handle this automatically; custom clients need a one-line change.\n\n**Pre-installed deps in the compiler image:** `partyserver`, `partysocket`, and `hono-party` are now cached in `/deps/node_modules` so opt-in collab projects compile without an extra `npm install` step. `Y-PartyServer` (Yjs CRDT support) stays opt-in.\n\n**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.\n\n---\n\n## v0.10.20 — May 4, 2026\n\n### In-worker Durable Objects via `bindings.durableObjects[].from`\n\n`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.\n\nAdding `from` flips the entry into in-worker mode and the compiler does both:\n\n```ts\ndurableObjects: [\n {\n name: \"ITEM_STREAM\",\n className: \"ItemStream\",\n from: \"features/loops/lib/ItemStream\", // module path under src/\n },\n]\n```\n\nGenerates:\n- `src/index.ts`: `export { ItemStream } from './features/loops/lib/ItemStream';` — wrangler resolves the binding by class export.\n- `wrangler.toml`: a `[[migrations]]` block with `tag = \"qb-do-ItemStream\"` and `new_sqlite_classes = [\"ItemStream\"]`.\n- `CloudflareBindings`: `ITEM_STREAM: DurableObjectNamespace` so `c.env.ITEM_STREAM.idFromName(...)` typechecks.\n\nWhere 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.\n\n`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.\n\n`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.\n\nSee [Bindings → Durable Objects](/compiler/config/bindings#durableobjects) for the full reference.\n\n---\n\n## v0.10.19 — May 4, 2026\n\n### Fix: bundled-SPA auth survives `wrangler dev` on custom_domain projects\n\n`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:\n\n```\n# Compiled (correct)\nconnect-src 'self' https://api.example.com …\n\n# Served by wrangler dev (mangled)\nconnect-src 'self' https://localhost:8787 …\n```\n\nResult: the bundled SPA's hardcoded `VITE_QUICKBACK_API_URL` fetches get blocked in dev because the CSP only allows localhost. Reported by Loop on the 0.10.18 thread; verified end-to-end with a minimal `wrangler@4.85.0 dev --local` repro.\n\nThe 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.\n\n`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.\n\nIf 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.\n\n**Action required:** none. Recompile (`quickback compile`) to pick up the fix.\n\n---\n\n## v0.10.18 — May 2, 2026\n\n### `experimentalRemote` — share deployed D1 with `wrangler dev`\n\nPer-binding `experimental_remote = true` flag emitted into the generated `wrangler.toml`. Useful for \"share prod auth in dev, keep feature writes sandboxed\":\n\n```ts\nproviders: {\n database: defineDatabase(\"cloudflare-d1\", {\n splitDatabases: true,\n experimentalRemote: {\n auth: true, // wrangler dev reads/writes deployed AUTH_DB\n features: false, // (default) features stays local\n audit: false,\n webhooks: false,\n files: false,\n },\n }),\n}\n```\n\nKeys are logical binding names — `auth` flips the flag on the `AUTH_DB` binding, `features` flips it on `DB` (or the legacy single-DB binding), `audit` / `webhooks` / `files` follow the same pattern. Off by default; only enable for databases you intend to share.\n\n### Google OAuth + signup ToS\n\nThe Account SPA now wires Google OAuth end-to-end when `auth.providers.auth.config.socialProviders.google.enabled: true`. The compiler bakes the right `VITE_ENABLE_GOOGLE_OAUTH` flag into the SPA's `.env` so the social-login button renders only when the provider is enabled — no more dead buttons.\n\nSignup flow gains a Terms-of-Service checkbox gate (configurable via the Account SPA's branding config).\n\n### CLI compile auth gate + device-auth redirect fix\n\n- `quickback compile` now requires authentication for cloud-compiler runs (closes the unauth public-compile path).\n- 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.\n\n### Skill restructure (Claude Code skill)\n\nThe bundled Claude Code skill was reorganized for clarity:\n\n- `SKILL.md` is now a thin orientation pointer, not a 600-line dump\n- Reference docs split into `Compiler` and `Stack` sections\n- 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\n- Tightened against audit gaps surfaced by red-team review\n\nRun `quickback claude install` to pick up the new skill layout.\n\n---\n\n## v0.10.17 — May 2, 2026\n\n### Security fix: CSP auto-config no longer widens `default-src`\n\nWhen 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`.\n\n0.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.\n\nBefore (0.10.16):\n```\ndefault-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com @trustedOrigins https://api.example.com\n```\n\nAfter (0.10.17):\n```\ndefault-src 'self'\nstyle-src 'self' 'unsafe-inline' https://fonts.googleapis.com\nfont-src 'self' https://fonts.gstatic.com\nconnect-src 'self' @trustedOrigins https://api.example.com\n```\n\n**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.\n\nThe 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.\n\n---\n\n## v0.10.16 — May 2, 2026\n\n### CSP auto-config now covers SPA-baked-in API origins\n\nWhen the bundled CMS or Account SPA is enabled, the compiler already inlines the API URL into the SPA bundle as a string literal at build time (`VITE_QUICKBACK_API_URL=https://${unifiedDomain}`). That hardcoded URL is what the SPA actually fetches — regardless of which origin is currently serving the page. CSP `connect-src` must allow it explicitly.\n\n0.10.16's auto-config picks up every domain the compiler already knows about — `config.domain`, the inferred `quickback.{baseDomain}`, `cms.domain`, `account.domain`, the admin domain — and adds `https://${each}` to `connectSrc` whenever a bundled SPA is enabled.\n\nThe motivating case: running the SPA on `localhost:5173` while it's still baked against `https://quickback.your-app.com`. Pre-0.10.16 the localhost CSP's `'self'` blocked the prod URL; users were patching it manually. Now it just works.\n\n```\n[security] auto-added https://quickback.loop.kardoe.com to csp.connectSrc — account: true → bundled Account SPA → SPA bundle hardcodes https://quickback.loop.kardoe.com as VITE_QUICKBACK_API_URL / etc.\n```\n\n`@trustedOrigins` (the CORS allowlist) is unchanged — it still gets added independently. The two cover different things: `@trustedOrigins` permits CORS-allowed sibling subdomains; the new SPA-baked addition permits the exact URL the SPA's compiled bundle hardcodes.\n\nCombined with 0.10.15's bundled-SPA defaults, most projects can now write the minimal:\n\n```ts\nsecurity: {\n csp: {\n defaultSrc: ['@self'],\n scriptSrc: ['@self'],\n objectSrc: ['@none'],\n upgradeInsecureRequests: true,\n },\n}\n```\n\n…and the compiler fills in styleSrc font hosts, fontSrc gstatic, connectSrc trusted origins, and connectSrc SPA-baked URLs.\n\n---\n\n## v0.10.15 — May 2, 2026\n\n### CSP auto-config — bundled-SPA origins added automatically\n\nWhen `security.csp` is set, the compiler now widens directives **additively** based on the project's enabled features. The four rules:\n\n| Trigger | Auto-added | Directive |\n|---|---|---|\n| `cms: true` OR `account: true` | `'unsafe-inline'`, `https://fonts.googleapis.com` | `styleSrc` |\n| `cms: true` OR `account: true` | `https://fonts.gstatic.com` | `fontSrc` |\n| `csp` set (always) | `@trustedOrigins` | `connectSrc` |\n\nAnything you already wrote stays — auto-config never removes or overrides. Every applied addition prints to stderr at compile so the magic is visible:\n\n```\n[security] auto-added 'unsafe-inline' to csp.styleSrc — account: true → bundled Account SPA → inline style attributes from Tailwind / TanStack Router\n[security] auto-added @trustedOrigins to csp.connectSrc — CORS-trusted origins must be reachable from XHR/fetch (matches cors() allowlist)\n```\n\nThe 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.\n\n**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.\n\n**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.\n\n### Troubleshooting table for CSP violations\n\nThe 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.\n\n### Out of scope (deferred)\n\n- **Per-request CSP nonces** (`@nonce` sentinel implementation) — Phase 2 / 0.10.16. Sentinel still errors at compile in 0.10.15.\n- **`revocationCheck: 'kv'` for `auth.jwt`** — schema accepts it, runtime still errors at compile. Slipped from 0.10.15 to 0.10.16.\n- **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.\n\n---\n\n## v0.10.14 — May 1, 2026\n\n### `auth.jwt` — JWT bearer-token fast-path config\n\nQuickback's bearer-token JWT (the one minted by the auth middleware and consumed by the fast-path on every subsequent request) is now configurable. The most-tuned knob is `expiresIn` — drop it to bound the post-revocation replay window without affecting browser SPAs, which auto-refresh via `set-auth-token` on every authed call:\n\n```ts\nauth: {\n jwt: {\n expiresIn: 30, // 30s post-revocation replay window\n issuer: 'my-api', // iss claim (verified on the way back in)\n audience: 'partner-svc', // aud claim\n secretEnv: 'CUSTOM_JWT_SECRET', // override BETTER_AUTH_SECRET if you need the JWT secret rotated independently\n },\n}\n```\n\n`revocationCheck: 'kv'` (KV-denylist consult on every fast-path verify, ~5-15ms edge-cached, no D1 hit) is reserved in the schema today but **deferred to 0.10.15** — setting it errors at compile so the migration path is explicit. `'none'` (today's behaviour, 0 cost, replay bound by TTL) stays the default.\n\nSee [the docs page](/compiler/config/auth) for the full knob list and tuning recommendations.\n\n### MCP admin endpoints hidden from non-admin `tools/list`\n\nBetter Auth admin endpoints (`/admin/list-users`, `/admin/ban-user`, `/admin/impersonate-user`, etc. — 9 in total) now carry `x-access: { userRole: ['admin'] }` in the generated OpenAPI spec, which means the MCP server's existing access-filter automatically drops them from `tools/list` for callers without an admin token. Anonymous and member-role callers no longer see admin tooling enumerated through MCP; admin endpoints still exist on the HTTP surface (Better Auth gates them server-side regardless).\n\n### Declarative `security` config block\n\nEvery security response-header (`Content-Security-Policy`, `Cross-Origin-Opener-Policy`, `Cross-Origin-Embedder-Policy`, `Cross-Origin-Resource-Policy`, `X-Frame-Options`, `Strict-Transport-Security`, `Referrer-Policy`, `Permissions-Policy`) is now configurable from `quickback.config.ts`. Loop's `postcompile-patch.mjs` (which re-injected a fuller CSP and COOP after every `quickback compile`) can now be deleted in favour of:\n\n```ts\nsecurity: {\n csp: {\n defaultSrc: ['@self'],\n scriptSrc: ['@self'],\n styleSrc: ['@self', '@unsafe-inline'],\n frameAncestors: ['@none'],\n objectSrc: ['@none'],\n upgradeInsecureRequests: true,\n },\n coop: 'same-origin',\n}\n```\n\n`@`-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.\n\nThe 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.\n\nDefaults preserve 0.10.13 behaviour byte-for-byte — adding the block without setting any field is a no-op.\n\nSee [the docs page](/compiler/config/security) for the full reference.\n\n### HSTS no longer pins `localhost` to HTTPS\n\nThe 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.\n\n### Out of scope (deferred)\n\n- **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.\n- **Asset-hash CSP** for inline `<style>` and `<script>` blocks emitted by the bundled SPAs — Phase 3.\n- **Per-route CSP overrides** (e.g. one looser policy for `/admin`) — single global CSP for now.\n\n---\n\n## v0.10.13 — May 1, 2026\n\n### Clickjacking protection on every generated Worker\n\nEvery Worker now emits two clickjacking-defence headers on every\nresponse:\n\n- `Content-Security-Policy: frame-ancestors 'self' <TRUSTED_ORIGINS…>`\n- `X-Frame-Options: SAMEORIGIN`\n\nThe CSP allowlist is sourced from the same `TRUSTED_ORIGINS` constant\nthat gates CORS, so users configure their domains in one place\n(`auth.trustedOrigins` / `auth.trustedOriginDefaults` in\n`quickback.config.ts`) and both CORS and frame-ancestors stay in\nlockstep. `'self'` is always allowed so an app's own SPAs can frame\ntheir own routes (e.g. an account login popover hosted on the same\norigin).\n\nModern browsers obey `frame-ancestors` and ignore `X-Frame-Options`\nwhen both are set; the legacy header is included for clients that\ndon't speak CSP3. The CSP intentionally only sets `frame-ancestors` —\nadding `script-src` / `default-src` would need a much wider audit\nacross SPA assets, inline scripts, and third-party embeds, so that's\nleft as a follow-up.\n\nRecompile (`quickback compile`) and redeploy to pick this up — no\nconfig change needed unless you want to allow extra cross-origin\niframe embeds, in which case add them to `auth.trustedOrigins`.\n\n---\n\n## v0.10.12 — May 1, 2026\n\n### Bundled-docs sync for the MCP recon fix\n\nPatch release that re-bundles the CLI's offline docs (consulted by the\nClaude Code skill, Cursor rules, and other AI assistants) so they\nreflect the corrected `tools/list` access-filter behavior and CORS\nposture shipped in v0.10.11. The `compiler/config/agents.mdx` page\nitself was already corrected on the docs site immediately after the\n0.10.11 release; this bump propagates that text into the bundle inside\n`@quickback-dev/cli`.\n\nNo runtime or compiler behavior change — re-running `quickback compile`\nagainst this version produces the same output as v0.10.11.\n\n---\n\n## v0.10.11 — May 1, 2026\n\n### MCP `tools/list` is now access-filtered + recon-tightened\n\nThe generated MCP-over-HTTP server (`src/routes/mcp.ts`) had three holes\nthat turned a standard pentest into trivial recon:\n\n1. `tools/list` returned the entire tool catalogue to anyone — including\n admin-only endpoints — without checking auth or roles. Tool\n descriptions also leaked sentences like `[UNSAFE] bypasses tenant\n scoping and requires elevated access` verbatim.\n2. The endpoint set `Access-Control-Allow-Origin: *` so any origin could\n pull the catalogue from a browser.\n3. Unauthenticated `GET /mcp` enumerated every tool name in its\n discovery payload.\n\nFix:\n\n- Each tool now carries sanitised access metadata (`_access` covering\n `roles` / `userRole` / `or` / `and`, plus `_public` for `PUBLIC`\n pseudo-role or empty `security`). `tools/list` filters against the\n caller's `ctx` — unauth callers see only `_public` tools, authed\n callers see only role-gated tools they pass. Record predicates and\n function-form access (opaque at list time) are dropped.\n- Wildcard CORS removed entirely. The parent app's `cors()` middleware\n (origin allowlist via `TRUSTED_ORIGINS` + `BETTER_AUTH_URL`) now\n applies uniformly to `/mcp`, same as every other route.\n- `[UNSAFE] ... bypasses tenant scoping ...` flavour text is gone.\n `annotations.destructiveHint` and `_unsafe` remain — those are the\n spec-correct signals for clients to warn users.\n- Unauthenticated `GET /mcp` no longer lists tool names. Inventory is\n only available via the access-filtered `tools/list`.\n\nThis filter is recon-mitigation, not a security boundary: `tools/call`\nstill re-enters the Hono app and runs every middleware (auth, firewall,\naccess, guards, masking), so hiding a tool from list never weakens the\nunderlying gate.\n\nKnown follow-up: Better Auth admin endpoints (`ban-user`, `create-user`,\n`impersonate-user`, etc.) don't yet emit `x-access` in the OpenAPI spec,\nso any logged-in user still sees them in `tools/list` (the actual call\nis still gated by the admin plugin). Tracked separately.\n\n---\n\n## v0.10.10 — April 29, 2026\n\n### Reject reserved keys inside `access.record` at compile time\n\n`access.record` is a flat field map evaluated as implicit AND between\nentries — keys must be column names. Putting `and: [...]` (or `or` /\n`roles` / `userRole`) inside `record` was a real-world footgun: the\nruntime treated the literal string `\"and\"` as a column lookup, the\npredicate failed on every row, and the caller got a silent `403` /\nempty list with nothing pointing at the misuse. The TypeScript type\ncouldn't catch this — `RecordConditions` is an open-ended index\nsignature, so any key parses.\n\nThe compiler now walks every access node attached to a resource (CRUD\nops, `read.access`, view access, masking `show` / `query`, action\naccess) and throws a clear migration error when `record` contains a\nreserved key:\n\n- `and` / `or` inside `record` → use the top-level `and` / `or`\n sibling: `{ and: [{ record: { ... } }, { record: { ... } }] }`\n- `roles` / `userRole` inside `record` → put them at the access node\n alongside `record`: `{ roles: [...], record: { ... } }`\n\nThe error names the exact origin (`crud.update.access`,\n`actions.focus.access.or[1]`, etc.) so the fix lands in the right place.\n\n---\n\n## v0.10.9 — April 29, 2026\n\n### Role hierarchy now expands in record-based action access\n\n`auth.roleHierarchy: ['member', 'admin', 'owner']` plus\n`access: { roles: ['member+'] }` on a record-based action used to\nsilently 403 valid callers. The standalone-action route generator\ninlined the expanded role list as a JSON literal, but the\nrecord-based generator read the access config back through the\nruntime `actions['name'].access` import — the user's source, where\nthe unexpanded `'member+'` shorthand still lived. The runtime did\nliteral string matching against `ctx.roles`, so an `owner` calling\nthe action got `['member+'] !== 'owner'` and was rejected.\n\nFixed: record-based action routes now inline the expanded list the\nsame way standalone routes do. `input` and `execute` still flow\nthrough the runtime import (closures aren't serializable); only the\naccess config is lifted to a JSON literal so the compile-time\nexpansion actually reaches the matcher.\n\nA regression test (`role-hierarchy-action-routes.test.ts`) locks the\nbehavior in — it asserts that `member+` never reaches the route\noutput and that the access config is no longer read from\n`actions[name].access` at runtime.\n\n---\n\n## v0.10.8 — April 29, 2026\n\n### Audit support on postgres targets, plus a generated-API quality pass\n\n**Audit on PG.** Until this release, `audit_events` only existed on cloudflare-d1 — projects on Neon (or any postgres target) silently skipped audit logging on `unsafe:` and `PUBLIC`-role actions, and hard delete was hard-blocked. Postgres has no equivalent of D1's separate-database binding model, but it has native schemas — so the audit table now lives in a dedicated `audit` schema in the same database as features (`drizzle.pgSchema('audit')`). The `hasSecurityAudit` gate accepts D1 OR any PG dialect; the `auditDatabaseId` requirement only fires for D1 (which still uses the separate-binding model). The recruitment example wires `auditDatabaseId` so the recompile path stays green.\n\n**`auditDatabaseId` is now a compile-time requirement** (D1 only). Previously, projects with unsafe/PUBLIC actions but no audit id silently produced a `database_id = \"local-audit\"` placeholder in production `wrangler.toml`; Cloudflare's worker upload step then rejected it with code 10021 *after* assets and migrations had already run. The compile-time error names the exact `wrangler d1 create <project>-audit` command and the `auditDatabaseId` config key where the returned id goes.\n\n### Five fixes from a Loop integration ticket pass\n\n**Action input → OpenAPI / MCP.** `defineAction({ input: z.object({...}) })` schemas now flow into `requestBody` on the OpenAPI operation and `inputSchema.properties` / `_bodyFields` on the MCP tool list. Simple `z.object` shapes are extracted at compile time; for discriminated unions, refinements, recursive schemas, and bare-identifier references (`input: createPersonInput`), the compiler runs your action file through Zod 4's native `z.toJSONSchema()` during compilation — full-fidelity output with no static translator to maintain. Pre-fix, every action came out as a no-arg endpoint, which gutted typed SDK generation and made MCP useless for actions that take parameters.\n\n**OpenAPI fidelity.** Three surgical fixes that strict validators (zod, openapi-typescript, openapi-fetch) had been complaining about:\n- Response schemas now emit `required[]` for every non-nullable column, so generated SDKs treat them as guaranteed-present rather than optional.\n- `text(_, { enum: [...] })` columns emit as closed `{ type: \"string\", enum: [...] }`, narrowing to literal unions.\n- `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.\n\n**Mask auto-detector now checks the column exists.** The auto-mask predicate used to be unconditionally `show: { or: 'owner', roles: ['admin'] }` — including for tables with no owner column at all (no `userId` / `ownerId` and no `q.scope('owner')`). The generated mask function would reference a non-existent column and fail under TypeScript checks. The auto-detector now verifies the resolved owner column exists in the parsed schema before emitting the `or` clause; when it doesn't, the rule falls back to roles-only and the compiler emits a warning so the behavior is transparent.\n\n**Error code consistency.** The generated CRUD layer was emitting raw codes (`'UNAUTHORIZED'`, `'NOT_NULL_VIOLATION'`, `'UNIQUE_VIOLATION'`, `'INSERT_FAILED'`, `'UPDATE_FAILED'`) that were never in the `QuickbackErrorCode` enum, so consumers couldn't switch exhaustively on `code`. New `database` layer + `DB_NOT_NULL_VIOLATION` / `DB_UNIQUE_VIOLATION` / `DB_INSERT_FAILED` / `DB_UPDATE_FAILED` / `NOT_FOUND` codes are now in the enum, the routes use `AuthErrors.missing()` / `DatabaseErrors.*()` helpers throughout, and the OpenAPI `Error` component emits `code` as a closed enum sourced from the canonical `QUICKBACK_ERROR_CODES` list. Generated SDKs can now `switch` on `code` without a default branch swallowing unknown values. See [API errors](/compiler/targets/hono-api/using-the-api/errors#database).\n\n**Dropped dead `auditFields` preamble from action route generators.** The audit wrapper's `Proxy` already hard-stamps `createdAt` / `createdBy` / `modifiedAt` / `modifiedBy` on every INSERT and `modifiedAt` / `modifiedBy` on every UPDATE — the `auditFields` const the route preamble built was never read. Dropped from `standalone.ts` / `record-based.ts` and from the `ActionExecutorParams` JSDoc. Migrated 7 example handlers (drop `modifiedAt: auditFields!.modifiedAt` from `.set` payloads — the wrapper handles it). Note: `.onConflictDoUpdate({ set })` is *not* intercepted by the wrapper, so `upsertBatch`-style handlers keep an explicit `modifiedAt: now`.\n\n---\n\n## One file per action: greenfield action authoring\n\nAction authoring collapses to a single shape. Each action is its own file under `<feature>/actions/<name>.ts` using `defineAction({...})`. The filename is the action name AND the URL segment.\n\n```typescript\n// features/applications/actions/advance.ts\n\nexport default defineAction({\n description: \"Move an application forward in the pipeline\",\n input: z.object({ nextStatus: z.enum([\"screening\", \"interview\", \"offer\"]) }),\n access: { roles: [\"owner\", \"admin\"] },\n transition: {\n field: \"status\",\n via: \"nextStatus\",\n fromTo: { applied: [\"screening\"], screening: [\"interview\"], interview: [\"offer\"] },\n },\n async execute({ db, record, input, auditFields, whereTransition }) { /* … */ },\n});\n```\n\n`defineAction` is imported from a generated per-feature helper at `<feature>/.quickback/define-action.ts` — types `record`, `input`, and audit fields without manual annotations. The directory says what `:id` mounts to; the imports say what the body reads or writes.\n\n**Discovery rules:**\n- `actions/<name>.ts` binds to the feature's primary table (the `<feature>.ts` file at the feature root).\n- `actions/<table>/<name>.ts` binds to the sibling table file `<table>.ts` — for multi-table features.\n- Setting `path:` makes the action standalone (custom URL, no record fetch, no firewall preload).\n- Tableless features (no top-level `*.ts` files) require every action to be standalone.\n- 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)`.\n- 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).\n\n**Retired** (rejected at load time with migration guidance):\n\n- `actions.ts` (bundled multi-action file)\n- `_feature.ts` (shared preamble + tableless actions)\n- `handlers/` directory + `handler:` string ref\n- `defineActions(table, {…})` and `defineActions(null, {…})`\n- `export default { actions: {…} }`\n- Colocated `defineActions` inside table files\n- `standalone: true` flag (presence of `path:` is the new signal)\n- `*-actions.ts` / `*.actions.ts` filename patterns\n\nThe 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.\n\nThe 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.\n\nSee the [Actions docs](/compiler/definitions/actions) for the full reference.\n\n---\n\n## Multi-table actions per feature\n\nFeatures used to support exactly one `defineActions(table, …)` call via `actions.ts`, which forced unnatural feature splits whenever multiple tables in the same feature needed actions (a podcast feature with `episodes`, `shows`, `seasons`, `collections`, etc.). One feature directory can now own actions on multiple tables across three discovery modes:\n\n- **Colocated** (canonical) — `<table>.ts` containing both `defineTable` and `defineActions(<table>, …)`. One file per entity. Default for new features.\n- **`actions.ts`** (existing) — single primary-table actions file at feature root. Unchanged behaviour.\n- **`actions/<table>.ts`** — per-table action files for teams that want strict schema/behavior separation or need to break an import cycle.\n\nPlus the universal `_feature.ts` slot (at feature root) for **non-table-bound feature-level actions** (`export default { actions: { … } }` shape) and **shared Zod schemas** that get prepended once to the merged actions module so every sibling action sees them. Allowed in any of the three modes — orthogonal to table binding.\n\nThe decision flowchart: *one table with actions → colocate. Multiple tables with actions → colocate each. Hit a cycle or want strict separation → `actions/<table>.ts`. Want schema/actions split for a single-table feature → `actions.ts`. Non-table actions → always `_feature.ts`.*\n\nConflicts are batched and printed once before the compiler aborts — no \"fix one, recompile, fix the next\" loop. The CLI hard-errors when a feature mixes `actions.ts` with table-bound mode, when the same table has its `defineActions` declared in two places, when an `actions/<x>.ts` first-arg doesn't match the basename, or when `_feature.ts` contains `defineActions(table, …)`. Legacy `*-actions.ts` / `*.actions.ts` filenames in a feature dir trigger a soft warning naming the offending paths.\n\nWithin the legacy bundled `actions.ts` DSL, action names had to be unique within a feature — the runtime module merged every source into one keyspace, so colliding `publish` actions on `episodes` and `shows` would have silently overwritten each other. The retired `actions.ts` shape is no longer accepted, so this constraint is gone: the current one-file-per-action layout keys uniqueness per `(bindTable, name)` pair, and the codegen aggregator mangles the JS map key per bind-table while keeping the URL segment bare. Sibling-bound `actions/episodes/publish.ts` and `actions/shows/publish.ts` mount at `/episodes/:id/publish` and `/shows/:id/publish` and compile cleanly.\n\nInline `execute:` bodies must be arrow functions (`execute: async (ctx) => { … }`). `async function` and plain `function` shapes were silently misparsed by the route emitter — they now hard-error at parse time pointing at the canonical arrow form, with a suggestion to use `handler:` for callers who genuinely need a named function declaration.\n\n`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.\n\nMigration: 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`.\n\n---\n\n## Firewall: named-scope shape restored, auto-detection synonyms widened\n\nThe named-scope firewall shape (`firewall: { organization: { column: 'tenant_id' } }`) is back as a co-equal user-facing input alongside the predicate array. DSL v2 step 8 had walled it off, but the internal architecture still kept named-scope around for the route + scoped-db generators — so re-accepting it at the input boundary is a thin coercion layer, not an architectural change.\n\n```typescript\n// All three are now valid; all compile to the same predicate array internally.\nfirewall: { organization: { column: 'tenant_id' } } // named-scope (compact)\nfirewall: { owner: { column: 'account_user_id' } }\nfirewall: { exception: true }\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'deletedAt', isNull: true },\n] // predicate array (explicit)\n```\n\nPick 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.\n\n**Auto-detection synonyms expanded.** When `firewall:` is omitted entirely, the compiler scans the schema for an isolation column. The org-scope list now accepts `organizationId`, `organisationId`, `orgId`, `organization`, `organisation`, `org` (American + British). User-scope still accepts `userId` only.\n\n**`ownerId` is now a targeted error signal.** When a table carries `ownerId` but no isolation column AND no explicit `firewall:`, the compiler raises a specific error: `\\`ownerId\\` is business-logic ownership, not access control — Quickback won't auto-derive a firewall from it. Either rename to \\`userId\\` if this column controls access, add a separate \\`userId\\` / \\`organizationId\\` column, or specify \\`firewall:\\` explicitly.` This replaces the generic \"missing isolation column\" error in the `ownerId`-only case and preserves the documented distinction between RLS-style access control (`userId`) and business-logic ownership (`ownerId`).\n\nMigration: 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.\n\n---\n\n## v0.10.0 — April 26, 2026\n\n### `q.scope()` column DSL + unified `masking.query` gate\n\nTwo 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).\n\n**`q.scope(kind)` — single-declaration tenant scoping.** Replaces the three-place pattern (column declaration + firewall predicate + implicit ownership-guard) with one column. `q.scope('organization')` compiles to `text(...).notNull()` and tells the compiler:\n\n1. Auto-derive the firewall predicate (`{ field: 'organizationId', equals: 'ctx.activeOrgId' }`) so the explicit `firewall:` block can be omitted entirely.\n2. Add the column to `GUARDS_CONFIG.systemManaged` so client input is rejected at the guard layer.\n3. Auto-populate from `ctx` on create / upsert.\n\nThe 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.\n\n```typescript\ncolumns: {\n organizationId: q.scope('organization'), // → ctx.activeOrgId\n ownerId: q.scope('owner'), // → ctx.userId\n teamId: q.scope('team'), // → ctx.activeTeamId\n}\n```\n\nThe auto-derived firewall also includes the soft-delete predicate (`{ field: 'deletedAt', isNull: true }`) when audit-field injection is on (the default). See [`q.scope()` in the schema docs](/compiler/definitions/schema#qscope--tenant-scope-columns).\n\n**`masking[col].query.roles` — unified role gate for filter / sort / search.** The three legacy per-capability flags (`filterable`, `searchable`, `sortable`) are replaced by a single allowlist that says \"these roles can query the column.\"\n\n```typescript\nmasking: {\n email: {\n type: 'email',\n show: { roles: ['admin'] },\n query: { roles: ['admin'] }, // optional — defaults to show.roles\n },\n}\n```\n\nWhen omitted, `query` inherits from `show.roles` (\"if you can see it, you can query it\") which is the right shape for almost all PII. A view's own `query.{filterable,searchable,sortable}` allowlist is the opt-in for higher-privileged roles; the existing intersection validator gates it at compile time. See [Masking query gate](/compiler/definitions/masking#query-gate-filter--sort--search).\n\n**Breaking:** Setting `masking[col].filterable / .searchable / .sortable` is rejected at compile time with a migration hint. Replace with `query.roles` (or just delete the flags — `query` defaults to `show.roles`).\n\n---\n\n## v0.9.0 — April 25, 2026\n\n### DSL v2: unified `read:` pipeline, transactional batches, ID-probe defense\n\nStep 8 of the DSL v2 refactor lands. The headline shift is that the read\nside of every resource now has its own block — `read:` — that owns the\ncollection-level `GET /` endpoint, single-record `GET /:id`, and named view\nprojections. The legacy `crud.list` and `crud.get` shapes are rejected at\ncompile time. See the new [Read pipeline](/compiler/definitions/read) page\nfor the full reference and migration table.\n\n**Breaking changes** (compile-time errors with migration hints):\n\n- `crud.list` → [`read.access`](/compiler/definitions/read) (plus `read.pageSize` / `read.maxPageSize`)\n- `crud.get` → `read.access` (single-record GET inherits automatically; use record-level conditions on `read.access` for differentiated single-record gates)\n- Top-level `views: {...}` → [`read.views: {...}`](/compiler/definitions/read#views-under-read-views)\n- `crud.list.fields` / `crud.get.fields` → declare a named view under `read.views` and call `?view={name}` (or `/views/{name}`)\n\n**Pre-record access ordering on `/:id`**: handlers now run a role-only\naccess check **before** the firewall query, so a caller without a matching\nrole gets 403 before the database is touched. This closes the 404-vs-403\nID-probe channel — an unauthorized caller can no longer distinguish \"row\nexists in another tenant\" from \"row doesn't exist.\" See\n[Access evaluation order](/compiler/definitions/access#evaluation-order).\n\n**Transactional batch operations**: batch endpoints now expose a\n`failFast` option (replacing the old `atomic` naming) and a\n`meta.transactional` response field. On tx-supporting providers\n(postgres, supabase, neon, libsql, better-sqlite3, bun-sqlite), `failFast: true`\nwraps the per-record loop in `db.transaction(...)` so any failure rolls\nback the entire batch. On Cloudflare D1 (no `db.transaction`), `failFast: true`\nstill stops on the first error but prior writes stay committed; inspect\n`meta.transactional` to know which guarantee you got. Embedding queue\nmessages and realtime broadcasts are emitted **after** the transaction\ncommits, so a rolled-back batch produces no orphan jobs. See\n[Batch Operations: Transactional semantics](/compiler/targets/hono-api/using-the-api/batch-operations#transactional-semantics).\n\n**`firewallErrorMode` lifted off the firewall block**: the field that\ncontrols 403-vs-404 on firewall misses now lives at the resource top level\n(sibling to `firewall:`), since the firewall config is now a predicate\narray and this is a presentation-layer choice. Existing `firewall.errorMode`\nvalues should be lifted to `firewallErrorMode` at the resource level.\n\n**Read-only resources**: an empty `crud: {}` block (or omitting `crud:`\nentirely) is valid for read-only resources. `read:` alone is enough to\nexpose `GET /` and `GET /:id`.\n\n**Strict-mode top-level keys**: the strict allow-list now includes `dev` so\n`defineConfig({ dev: { ... } })` is accepted at the top level.\n\n---\n\n## v0.8.7 — April 17, 2026\n\n### Security: Hono CVE cluster fix\n\nHono is bumped to `^4.12.14` across the monorepo, the compiler Docker image's pre-installed deps, and every generator path that emits Hono into compiled projects. Older ranges (`^4.0.0` / `^4.5.0` / `^4.6.0` / `^4.7.11`) covered the vulnerable window. Recompile to pick up the fix in your generated project's `package.json`.\n\n### Cloudflare Email Sending is now in public beta\n\nQuickback already defaults to the Workers `send_email` binding for Cloudflare deploys, and Cloudflare Email Sending has now graduated to public beta — production-ready with zero-config, no API keys, no third-party accounts. No action needed; recompiling any existing project continues to wire the default Cloudflare transport. AWS SES remains a fully supported opt-in (`email.provider: 'aws-ses'`) for non-Cloudflare runtimes or existing SES setups. See [Email Configuration](/compiler/config#email-configuration).\n\n### Minor/patch dep sweep\n\nAligned the whole dep surface — monorepo, compiler Docker image, and generator emissions into compiled projects — so new compiles and existing recompiles converge on the same versions:\n\n- `wrangler@^4.83.0`\n- `drizzle-orm@^0.45.2`, `drizzle-kit@^0.31.10`\n- `zod@^4.3.6`\n- `@cloudflare/workers-types@^4.20260417.1` (also deduped — was accidentally declared in both `dependencies` and `devDependencies` in some paths)\n- `@tanstack/react-query@^5.99.0` (Account app)\n\n---\n\n## v0.8.5 — April 15, 2026\n\n### Fix: Better Auth 1.5 and `@cloudflare/workers-types` Compatibility\n\nGenerated API code failed to typecheck after Better Auth bumped to 1.5 and `@cloudflare/workers-types` tightened `BufferSource` to `ArrayBufferView<ArrayBuffer>`. Four unrelated surfaces broke:\n\n- **`databaseHooks.member.update.after` was removed** in Better Auth 1.5. The compiler now emits the member role-change broadcast hook as `organizationHooks.afterUpdateMemberRole` inside the `organization()` plugin call, which is the current supported shape.\n- **`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).\n- **`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.\n- **`crypto.subtle.sign` / `verify`** no longer accept `Uint8Array<ArrayBufferLike>` directly. Generated `jwt.ts` casts encoded payloads to `BufferSource`.\n\nNo config changes required — recompile to pick up the fixes.\n\n### CMS Admin Gate Now Enforced Server-Side\n\n`cms: { access: \"admin\" }` previously only hid the CMS link in Account UI and rendered an \"Access Denied\" screen inside the SPA — the static assets, `/api/v1/schema`, and `/api/v1/custom_view` CRUD were reachable by any authenticated user. A non-admin with an API token or cookie could bypass the UI and read schema metadata or saved CMS views directly.\n\nThis release adds server-side enforcement at every CMS-facing surface:\n\n- **CMS SPA shell** — the Worker checks `ctx.userRole === \"admin\"` before serving `index.html`. Unauthenticated requests redirect to login; authenticated non-admins get `403 Admin access required`. Static bundles (JS/CSS) remain reachable so browser caches aren't invalidated.\n- **`/api/v1/schema`** — returns `403` to non-admins.\n- **`custom_view` CRUD** — now gated on the new `userRole: [\"admin\"]` primitive rather than org membership.\n- **In-SPA gate** — unchanged; defense in depth behind the server-side gates.\n\nYour resource CRUD endpoints are unaffected — they keep their per-resource `crud.access.roles`.\n\n### New `userRole` Access Primitive\n\nAdded `userRole?: string[]` to the declarative `Access` config, evaluated against `ctx.userRole` (the Better Auth admin-plugin `user.role` column). This is distinct from `roles`, which matches `ctx.roles` (org membership).\n\n```typescript\n// Old: in multi-tenant this meant org-admin, not platform-admin\naccess: { roles: ['admin'] }\n\n// New: explicitly require user.role === 'admin' regardless of org membership\naccess: { userRole: ['admin'] }\n\n// \"Org owner OR platform admin\"\naccess: { or: [{ roles: ['owner'] }, { userRole: ['admin'] }] }\n\n// Platform admins see SSNs across every org\nmasking: { ssn: { type: 'ssn', show: { userRole: ['admin'] } } }\n```\n\n`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).\n\n### Fix: `ReferenceError: customAlphabet is not defined` in generated POST handlers\n\nProjects 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.\n\nThe compiler now emits the correct import alongside the ID expression for all three modes: `nanoid`, `customAlphabet`, and `createId` from `@paralleldrive/cuid2`.\n\nNo config changes required — recompile to pick up the fix.\n\n### Fix: Dangling `export const` in generated `actions.ts` breaks `tsc`\n\nWhen a feature authored actions as `export const xActions = defineActions(...)` (instead of `export default defineActions(...)`), the compiler's preamble extractor leaked the assignment's left-hand side into the generated `src/features/<feature>/actions.ts`. The output contained a dangling `export const xActions =` with no right-hand side, and `tsc --noEmit` failed with `TS1109: Expression expected`. Runtime happened to work because the unused placeholder was never evaluated, but typecheck was red.\n\nThe preamble extractor now anchors its boundary to the start of the top-level statement containing `defineActions(...)`, covering `export default`, `export const X =`, `const X =`, and bare call forms. Local Zod helper declarations above the call continue to be preserved.\n\n### Fix: Files worker `database_id` reverted to `\"local-files\"` on every compile\n\nProjects 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.\n\nThe 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.\n\nNo config changes required — recompile and redeploy the files worker.\n\n---\n\n## v0.8.6 — April 16, 2026\n\n### Fix: Audit columns silently dropped from tables with a same-line index callback\n\nTables authored with the composite-index shape Drizzle / prettier produces —\n\n```ts\nexport const episodeTags = sqliteTable(\"episode_tags\", {\n id: text(\"id\").primaryKey(),\n episodeId: text(\"episode_id\").notNull(),\n tagId: text(\"tag_id\").notNull(),\n}, (t) => [ // <-- \"}, (t) =>\" on one line\n uniqueIndex(\"episode_tag_unique\").on(t.episodeId, t.tagId),\n]);\n```\n\nnever 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`.\n\nThe 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.\n\n**Recovery path:**\n\n- 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.\n- 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.\n\n### Fix: `firewall.exception` generated `isNull(<table>.deletedAt)` against a missing column\n\nResources 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`.\n\nThe three concerns are now fully independent:\n\n- **`firewall.exception: true`** — only disables tenant scoping (org/user/team `WHERE` clauses). It does not gate audit fields or soft-delete.\n- **Audit fields** — always injected unless globally opted out. Unchanged.\n- **Soft-delete filter** — emitted only when the schema actually has `deletedAt` *or* the user explicitly set `firewall.softDelete`.\n\nIn 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.\n\nNo config changes required — recompile to pick up the fix.\n\n---\n\n## v0.8.4 — April 14, 2026\n\n### New `generateId: \"short\"` Strategy\n\nAdded a compact ID option for tables where short, shareable codes matter more than collision resistance at scale:\n\n```typescript\nproviders: {\n database: defineDatabase(\"cloudflare-d1\", {\n generateId: \"short\",\n }),\n}\n```\n\nGenerates 6-character alphanumeric IDs (e.g. `a3F9xK`) using nanoid's `customAlphabet` with the full 62-char alphabet (`0-9A-Za-z`). Requires the `nanoid` package in your project (same as the existing `\"nanoid\"` strategy).\n\n**When to use:** room codes, invite links, share URLs, ephemeral records — anywhere the ID appears in a URL or needs to be human-typeable.\n\n**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\"`.\n\nSee [Providers - ID Generation Options](/compiler/config/providers#id-generation-options) for the full list of strategies.\n\n---\n\n## v0.8.3 — April 14, 2026\n\n### Fix: `wrangler.toml` Route Placement and Binding IDs\n\nTwo bugs in the generated `wrangler.toml` that blocked production deployment without manual edits:\n\n**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.\n\n**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:\n\n| Binding | Config sources checked (in order) |\n|---------|-----------------------------------|\n| `AUTH_DB` | `database.config.authDatabaseId` |\n| `DB` | `database.config.featuresDatabaseId`, `database.config.databaseId` |\n| `FILES_DB` | `fileStorage.config.filesDatabaseId`, `database.config.filesDatabaseId` |\n| `KV` | `database.config.kvNamespaceId`, `storage.config.namespaceId`, `auth.config.kvId` |\n\nSee [Providers - Database Options](/compiler/config/providers#database-options) for the full list of supported ID properties.\n\n### Fix: Account SPA Post-Login Redirect on Unified Domain\n\nWhen 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.\n\nThe 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.\n\nNo config changes required — recompile to pick up the fix.\n\n---\n\n## v0.8.2 — April 11, 2026\n\n### Catch-All `VITE_QUICKBACK_URL` Environment Variable\n\nInstead of setting four separate URL env vars, you can now point at a single Quickback origin:\n\n```bash\n# One variable — done.\nVITE_QUICKBACK_URL=https://secure.example.com\n```\n\nWhen set, it's used as a fallback for the individual URLs:\n\n| Individual var (explicit) | Fallback when unset |\n|---|---|\n| `VITE_QUICKBACK_API_URL` | `${VITE_QUICKBACK_URL}` |\n| `VITE_QUICKBACK_ACCOUNT_URL` | `${VITE_QUICKBACK_URL}/account` |\n| `VITE_QUICKBACK_CMS_URL` | `${VITE_QUICKBACK_URL}/cms` |\n\n`VITE_QUICKBACK_APP_URL` stays independent — it points at the tenant's own frontend, not the Quickback server.\n\n**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.\n\nSee [Environment Variables](/stack/account-ui/environment-variables) for the full reference.\n\n---\n\n## v0.8.1 — April 9, 2026\n\n### Role Hierarchy with `+` Suffix\n\nYou can now define a role hierarchy in your config and use the `+` suffix in access rules to mean \"this role and above\":\n\n```typescript\n// quickback.config.ts\nauth: {\n roleHierarchy: ['member', 'admin', 'owner'],\n}\n\n// In resource definitions\ncrud: {\n list: { access: { roles: [\"member+\"] } }, // member, admin, owner\n create: { access: { roles: [\"admin+\"] } }, // admin, owner\n delete: { access: { roles: [\"owner\"] } }, // owner only\n}\n```\n\nRoles are expanded at compile time. No `+` = exact match. See [Access - Role Hierarchy](/compiler/definitions/access#role-hierarchy) for details.\n\n---\n\n## v0.8.0 — April 9, 2026\n\n### Breaking: VITE URL Environment Variables Renamed\n\nAll Quickback-generated URL environment variables are now namespaced under `VITE_QUICKBACK_*` to avoid collisions with other Vite projects.\n\n| Old | New |\n|-----|-----|\n| `VITE_API_URL` | `VITE_QUICKBACK_API_URL` |\n| `VITE_ACCOUNT_URL` | `VITE_QUICKBACK_ACCOUNT_URL` |\n| `VITE_APP_URL` | `VITE_QUICKBACK_APP_URL` |\n| `VITE_CMS_URL` | `VITE_QUICKBACK_CMS_URL` |\n\n**Non-URL variables are unchanged:** `VITE_ENABLE_*` feature flags, branding vars (`VITE_APP_NAME`, etc.), and `VITE_STRIPE_PUBLISHABLE_KEY` stay as-is.\n\n**Action required:**\n- **Compiled projects** — re-run `quickback compile`. The compiler generates the new names automatically.\n- **Standalone deploys** — update `.env`, `.env.production`, and `wrangler.toml` files manually.\n- **Library users** — the `__QUICKBACK_API_URL__` / `__QUICKBACK_APP_URL__` globalThis names are unchanged, but if you pipe Vite env vars into them, update the var names.\n\nSee [Environment Variables](/stack/account-ui/environment-variables) for the full reference.\n\n### CMS Access Control\n\nThe `cms.access` config option now enforces access at the CMS level, not just link visibility in Account UI.\n\n```typescript\ncms: { access: \"admin\" }\n```\n\nWhen 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.\n\nSee [CMS Connecting](/stack/cms/connecting) and [Compiler Config](/compiler/config) for details.\n\n### SPA Sub-Route Fix\n\nFixed a bug where hard-refreshing or directly navigating to SPA sub-routes (e.g., `/account/profile`, `/cms/tables/users`) returned a blank white screen. The Worker now correctly serves `index.html` for all SPA paths, allowing the client-side router to handle routing.\n\n---\n\n## v0.5.11 — February 24, 2026\n\n### Email OTP & Auth Fixes\n\n- Fixed email-OTP magic links not working correctly\n- Removed deprecated `/internal/validate` endpoint — use standard Better Auth session validation instead\n- Auth is now required for all API routes when running locally (previously some routes were unprotected in dev)\n\n### Multiple Table Exports Fix\n\n- Fixed a compiler error when a single file exports multiple Drizzle tables alongside a `defineTable()` default export\n- The CLI now properly detects and reports this with a clear error message pointing to the fix\n\n### Headless Drizzle Rename Hints\n\n- Added `compiler.migrations.renames` configuration for CI/CD environments where Drizzle's interactive rename prompts would block compilation\n- Compile errors now include explicit rename key paths and fail fast on malformed rename config keys\n- See [Configuration](/compiler/config) for details\n\n### Security Contract Report Artifacts\n\n- Added generated security contract artifacts to compiler output:\n - `reports/security-contracts.report.json`\n - `reports/security-contracts.report.sig.json`\n- Added config-driven signing controls:\n - `compiler.securityContracts.report.signature.enabled`\n - `compiler.securityContracts.report.signature.required`\n - `compiler.securityContracts.report.signature.key` / `keyEnv` / `keyId`\n- Missing required signing keys now fail loudly with explicit remediation guidance\n- Added strict config validation for report/signature paths and signing options\n\n### Mandatory Unsafe Action Audit Trail\n\n- Added structured unsafe action config (`unsafe: { reason, adminOnly, crossTenant, targetScope }`)\n- Cross-tenant unsafe actions now require Better Auth authentication plus platform admin role (`ctx.userRole === \"admin\"`)\n- Added mandatory audit logging for unsafe cross-tenant actions (success, denial, and error paths)\n- Cloudflare output now includes optional `AUDIT_DB` wiring, `drizzle.audit.config.ts`, and `db:migrate:audit:*` scripts when unsafe actions are present\n- Added compile-time raw SQL guard for actions and handlers (`allowRawSql: true` required per action)\n\n---\n\n## v0.5.10 — February 19, 2026\n\n### Compiler Page Parsing & CLI Output\n\n- Improved compiler page parsing for `definePage()` definitions\n- Better CLI output formatting during compilation\n- Added `apiPath` to schema registry for CMS integration\n\n### Bug Fixes\n\n- Fixed hyphenated action names not being properly quoted in generated code (e.g., `mark-complete` now generates valid JavaScript)\n- API key authentication (`x-api-key` header) is now handled separately from session tokens (`Bearer` header)\n\n---\n\n## v0.5.9 — February 16, 2026\n\n### CMS Pages & CLI Page Support\n\n- Added `definePage()` support for CMS-managed pages\n- Auth middleware improvements for page routes\n- CLI now supports page definitions alongside table and action definitions\n\n---\n\n## v0.5.8 — February 14, 2026\n\n### CMS App\n\n- Introduced the Quickback CMS — a schema-driven admin panel that connects to your generated API\n- CMS namespace added to actions for admin-specific operations\n- Fixed `guard` → `access` naming inconsistency in CMS action definitions\n\n### Schema Registry & Firewall Improvements\n\n- Added schema registry generator — the compiler now outputs a JSON schema registry used by the CMS\n- Firewall error modes: choose between `reveal` (403 with details) and `hide` (opaque 404) for security-sensitive deployments\n\n### Bug Fixes\n\n- Fixed anonymous user email format generation\n- Organization selector improvements in Account UI\n- Config validation now catches more errors at compile time\n- Better CRUD error handling with structured error responses\n- Fixed masking to use representative star counts instead of fixed formatting\n\n---\n\n## v0.5.7 — February 12, 2026\n\n### Scoped Database for Actions\n\nActions now receive a **security-scoped database** instead of a raw Drizzle instance. The compiler generates a proxy wrapper that automatically enforces org isolation, owner filtering, and soft-delete visibility — the same protections that CRUD routes have always had.\n\nThe scoped DB uses duck-typed column detection at runtime:\n\n| Column Detected | SELECT / UPDATE / DELETE | INSERT |\n|---|---|---|\n| `organizationId` | Adds `WHERE organizationId = ?` | Auto-injects `organizationId` from context |\n| `ownerId` | Adds `WHERE ownerId = ?` | Auto-injects `ownerId` from context |\n| `deletedAt` | Adds `WHERE deletedAt IS NULL` | — |\n\nThis means **every action is secure by default** — no manual `WHERE` clauses needed.\n\n```typescript\ndefineActions(todos, {\n complete: {\n type: \"record\",\n execute: async ({ db, ctx, record, input }) => {\n // db is scoped — only sees records in user's org, excludes soft-deleted\n const siblings = await db.select().from(todos);\n // ↑ automatically filtered to ctx.activeOrgId + deletedAt IS NULL\n },\n },\n});\n```\n\n#### Unsafe Mode\n\nActions that intentionally need to bypass security (admin reports, cross-org queries, migrations) can declare `unsafe: true` to receive a raw, unscoped database handle:\n\n```typescript\ndefineActions(analytics, {\n globalReport: {\n unsafe: true,\n execute: async ({ db, rawDb, ctx, input }) => {\n // db → still scoped (safety net)\n // rawDb → bypasses all security filters\n const allOrgs = await rawDb.select().from(organizations);\n },\n },\n});\n```\n\nWithout `unsafe: true`, `rawDb` is `undefined`.\n\n**Related docs:** [Actions](/compiler/definitions/actions), [Actions API](/compiler/targets/hono-api/using-the-api/actions-api)\n\n---\n\n### Cascading Soft Delete\n\nSoft-deleting a parent record now **automatically cascades** to child and junction tables within the same feature. The compiler detects foreign key references at build time and generates cascade UPDATE statements.\n\n```\nDELETE /api/v1/projects/:id\n```\n\nGenerated behavior:\n```typescript\n// 1. Soft delete the parent\nawait db.update(projects)\n .set({ deletedAt: now, deletedBy: userId })\n .where(eq(projects.id, id));\n\n// 2. Auto-cascade to children (compiler-generated)\nawait db.update(projectMembers)\n .set({ deletedAt: now, deletedBy: userId })\n .where(eq(projectMembers.projectId, id));\n\nawait db.update(projectTasks)\n .set({ deletedAt: now, deletedBy: userId })\n .where(eq(projectTasks.projectId, id));\n```\n\nRules:\n- Only applies to **soft delete** (the default). Hard delete relies on database-level `ON DELETE CASCADE`.\n- Only cascades within the **same feature** — cross-feature references are not affected.\n- Child tables must have `deletedAt` / `deletedBy` columns (auto-added by the compiler's audit fields).\n\n**Related docs:** [Actions API — Cascading Soft Delete](/compiler/targets/hono-api/using-the-api/actions-api#cascading-soft-delete)\n\n---\n\n### Advanced Query Parameters\n\nNew query parameter capabilities for all list endpoints:\n\n- **Field selection** — `?fields=id,name,status` returns only the columns you need\n- **Multi-sort** — `?sort=status:asc,createdAt:desc` sorts by multiple fields\n- **Total count** — `?count=true` returns total matching records in response headers (`X-Total-Count`)\n- **Full-text search** — `?search=keyword` searches across all text columns\n\n```bash\n# Get only names and statuses, sorted by status then date, with total count\nGET /api/v1/todos?fields=id,name,status&sort=status:asc,createdAt:desc&count=true\n\n# Search across all text fields\nGET /api/v1/todos?search=urgent\n```\n\n**Related docs:** [Query Parameters](/compiler/targets/hono-api/using-the-api/query-params)\n\n---\n\n### Audit Field Improvements\n\n- `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\n- All audit fields (`createdAt`, `createdBy`, `modifiedAt`, `modifiedBy`, `deletedAt`, `deletedBy`) are auto-managed\n\n---\n\n## v0.5.6 — February 8, 2026\n\n### Database Naming Conventions\n\n- Default table and column naming changed to **snake_case** with `usePlurals: false`\n- Table names derived from generated Better Auth schema for consistency\n- Removed legacy single-database mode — split databases (auth + features) is now the standard\n\n### Auth Variable Shadowing Fix\n\n- Fixed `member` variable in auth middleware that shadowed the Drizzle `member` table import\n- Renamed to `sessionMember` to avoid conflicts in generated routes\n\n---\n\n## v0.5.5 — February 5, 2026\n\n### Better Auth Plugins\n\n- Published `@quickback-dev/better-auth-upgrade-anonymous` v1.1.0 — post-passkey email collection flow\n- Published `@quickback-dev/better-auth-combo-auth` — combined email + password + OTP authentication\n- Published `@quickback-dev/better-auth-aws-ses` — AWS SES email provider for Better Auth\n\n### OpenAPI Spec Generation\n\n- Generated APIs now include a full OpenAPI specification at `/openapi.json`\n- Better Auth endpoints included in the spec\n- Runtime route: `GET /openapi.json`\n\n### Security Hardening\n\n- Global error handler prevents leaking internal error details\n- Security headers middleware (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)\n- `BETTER_AUTH_SECRET` properly passed to generated config\n\n---\n\n## v0.5.4 — January 30, 2026\n\n### Account UI\n\n- Pre-built authentication UI deployed as Cloudflare Workers\n- Features: sessions, organizations, passkeys, passwordless, admin panel, API keys\n- Dual-mode: standalone (degit template) or embedded with Quickback projects\n\n### Webhook System\n\n- Inbound webhook endpoints with signature verification\n- Outbound webhooks via Cloudflare Queues with automatic retries\n- Configurable per-feature webhook events\n\n### Realtime & Vector Search\n\n- Durable Objects + WebSocket realtime subscriptions\n- Vector embeddings via Cloudflare Vectorize\n- KV and R2 storage integrations\n\n---\n\n## v0.5.0 — January 2026\n\n### Initial Release\n\n- **Quickback Compiler** — TypeScript-first backend compiler\n- **Four Security Pillars** — Firewall, Access, Guards, Masking\n- **`defineTable()`** — Schema + security configuration in a single file\n- **Templates** — Cloudflare Workers, Bun standalone, B2B SaaS\n- **Cloud Compiler** — Remote compilation via `compiler.quickback.dev`\n- **CLI** — `quickback create`, `quickback compile`, `quickback init`\n- **Better Auth Integration** — Organizations, roles, sessions\n- **Drizzle ORM** — Schema-first with automatic migrations\n- **Cloudflare D1** — Split database support (auth + features)"
6
+ "content": "# Changelog\n\nRelease notes for the Quickback compiler, CLI, and platform.\n\n---\n\n## v0.12.0 — May 5, 2026\n\n### Per-room authorization for PartyServer rooms\n\n`bindings.durableObjects[].access` lets the compiler emit a path-scoped gate that runs the declared resource's existing firewall + `read.access` pipeline before the WebSocket upgrade — same pillars `GET /api/v1/<resource>/:id` enforces, zero hand-written auth code.\n\n```ts\ndurableObjects: [\n // Single-resource: roomId IS the chat row id.\n { name: 'Chat', className: 'Chat', from: 'lib/Chat',\n access: { resource: 'chats' } },\n\n // Multi-resource: regex dispatches kind → resource.\n { name: 'Notepad', className: 'Notepad', from: 'lib/Notepad',\n access: {\n roomId: { pattern: '^(day-note|interaction|record):([A-Za-z0-9_-]+)$', kindGroup: 1, idGroup: 2 },\n resources: {\n 'day-note': { resource: 'day-notes' },\n 'interaction': { resource: 'interactions' },\n 'record': { resource: 'records' },\n },\n } },\n\n // Anonymous game lobbies / public pads: explicit opt-out.\n { name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',\n access: 'public' },\n],\n```\n\nThe gate 401s unauthenticated callers, 403s when the firewall hides the row, 404s when the row is missing, and lets the upgrade proceed otherwise. DOs without an `access` declaration keep the v0.11.1 catchall (just `ctx.authenticated`). Resource references are validated against feature names at compile time so typos break the build, not the first WebSocket upgrade. See [PartyServer Rooms → Per-room authorization via access](/stack/realtime/partyserver-rooms#per-room-authorization-via-access-v012).\n\n---\n\n## v0.11.1 — May 5, 2026\n\n### PartyServer auto-mount is now secure by default\n\nThe `/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.\n\nThe auto-mount now wraps `partyserverMiddleware` in an auth check: `401 Unauthorized` if the caller has no resolved auth context, otherwise the upgrade proceeds. The four auth mechanisms the rest of the worker honors (session cookie, JWT bearer, `x-api-key` header, `?api_key=` / `?key=` query) all unlock connections automatically.\n\nPer-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.\n\nNo 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.\n\n---\n\n## v0.11.0 — May 5, 2026\n\n### OAuth Provider plugin (MCP-ready)\n\nQuickback 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.\n\nThis replaces Better Auth's deprecated `mcp` plugin and gives every future MCP client (Cursor, Claude Desktop, claude.ai connectors, custom tooling) RFC 7591 dynamic client registration + the well-known discovery documents they need to bootstrap themselves. See [Auth Plugins → OAuth Provider](/stack/auth/plugins#oauth-provider-mcp-ready).\n\n### API key auth via query parameter\n\nThe auth middleware now accepts API keys as `?api_key=...` or `?key=...` query parameters in addition to the `x-api-key` header. The header takes precedence when both are sent. This unblocks clients that can't inject custom headers — most notably claude.ai's MCP connector, which previously returned zero tools because every list/call attempt was unauthenticated.\n\nThe query-param form lands in access logs and `Referer` headers; prefer the header whenever the client supports it. See [Auth Plugins → API Keys](/stack/auth/plugins#api-keys).\n\n### PartyServer rooms + realtime URL split (breaking)\n\nThe realtime URL space is reorganized so the names match what each primitive does:\n\n- **`/realtime/v1/*` → `/broadcast/v1/*`** — the existing org-wide Broadcaster (Postgres-changes fan-out, ws-ticket auth) moves to its semantically accurate prefix. Same code, same behavior, just a different mount point.\n- **`/realtime/<binding>/<room-id>` is the new mount for [PartyServer](/stack/realtime/partyserver-rooms) rooms** — bidirectional, per-room (per-document) Durable Objects with presence and lifecycle hooks. Auto-mounted via `hono-party` whenever a project declares any in-worker DO via `bindings.durableObjects[].from`. Use these for collaborative editing, live cursors, and per-room state.\n\n**Breaking changes** — recompile + redeploy required:\n\n- The `REALTIME_URL` runtime env var is renamed to `BROADCAST_URL` (used by the org member-update broadcast hook in separate-mode realtime). If you set this via `wrangler secret put REALTIME_URL`, re-set it as `BROADCAST_URL`.\n- The auth-ui SPA helpers `getRealtimeWsUrl()` / `getRealtimeTicketUrl()` are renamed to `getBroadcastWsUrl()` / `getBroadcastTicketUrl()`. The `appConfig.routes.api.realtime` field is renamed to `appConfig.routes.api.broadcast`.\n- WebSocket subscribers that hardcoded `/realtime/v1/websocket` or `/realtime/v1/ws-ticket` need to be updated to `/broadcast/v1/...`. The bundled CMS and Account SPAs handle this automatically; custom clients need a one-line change.\n\n**Pre-installed deps in the compiler image:** `partyserver`, `partysocket`, and `hono-party` are now cached in `/deps/node_modules` so opt-in collab projects compile without an extra `npm install` step. `Y-PartyServer` (Yjs CRDT support) stays opt-in.\n\n**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.\n\n---\n\n## v0.10.20 — May 4, 2026\n\n### In-worker Durable Objects via `bindings.durableObjects[].from`\n\n`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.\n\nAdding `from` flips the entry into in-worker mode and the compiler does both:\n\n```ts\ndurableObjects: [\n {\n name: \"ITEM_STREAM\",\n className: \"ItemStream\",\n from: \"features/loops/lib/ItemStream\", // module path under src/\n },\n]\n```\n\nGenerates:\n- `src/index.ts`: `export { ItemStream } from './features/loops/lib/ItemStream';` — wrangler resolves the binding by class export.\n- `wrangler.toml`: a `[[migrations]]` block with `tag = \"qb-do-ItemStream\"` and `new_sqlite_classes = [\"ItemStream\"]`.\n- `CloudflareBindings`: `ITEM_STREAM: DurableObjectNamespace` so `c.env.ITEM_STREAM.idFromName(...)` typechecks.\n\nWhere 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.\n\n`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.\n\n`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.\n\nSee [Bindings → Durable Objects](/compiler/config/bindings#durableobjects) for the full reference.\n\n---\n\n## v0.10.19 — May 4, 2026\n\n### Fix: bundled-SPA auth survives `wrangler dev` on custom_domain projects\n\n`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:\n\n```\n# Compiled (correct)\nconnect-src 'self' https://api.example.com …\n\n# Served by wrangler dev (mangled)\nconnect-src 'self' https://localhost:8787 …\n```\n\nResult: the bundled SPA's hardcoded `VITE_QUICKBACK_API_URL` fetches get blocked in dev because the CSP only allows localhost. Reported by Loop on the 0.10.18 thread; verified end-to-end with a minimal `wrangler@4.85.0 dev --local` repro.\n\nThe 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.\n\n`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.\n\nIf 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.\n\n**Action required:** none. Recompile (`quickback compile`) to pick up the fix.\n\n---\n\n## v0.10.18 — May 2, 2026\n\n### `experimentalRemote` — share deployed D1 with `wrangler dev`\n\nPer-binding `experimental_remote = true` flag emitted into the generated `wrangler.toml`. Useful for \"share prod auth in dev, keep feature writes sandboxed\":\n\n```ts\nproviders: {\n database: defineDatabase(\"cloudflare-d1\", {\n splitDatabases: true,\n experimentalRemote: {\n auth: true, // wrangler dev reads/writes deployed AUTH_DB\n features: false, // (default) features stays local\n audit: false,\n webhooks: false,\n files: false,\n },\n }),\n}\n```\n\nKeys are logical binding names — `auth` flips the flag on the `AUTH_DB` binding, `features` flips it on `DB` (or the legacy single-DB binding), `audit` / `webhooks` / `files` follow the same pattern. Off by default; only enable for databases you intend to share.\n\n### Google OAuth + signup ToS\n\nThe Account SPA now wires Google OAuth end-to-end when `auth.providers.auth.config.socialProviders.google.enabled: true`. The compiler bakes the right `VITE_ENABLE_GOOGLE_OAUTH` flag into the SPA's `.env` so the social-login button renders only when the provider is enabled — no more dead buttons.\n\nSignup flow gains a Terms-of-Service checkbox gate (configurable via the Account SPA's branding config).\n\n### CLI compile auth gate + device-auth redirect fix\n\n- `quickback compile` now requires authentication for cloud-compiler runs (closes the unauth public-compile path).\n- 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.\n\n### Skill restructure (Claude Code skill)\n\nThe bundled Claude Code skill was reorganized for clarity:\n\n- `SKILL.md` is now a thin orientation pointer, not a 600-line dump\n- Reference docs split into `Compiler` and `Stack` sections\n- 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\n- Tightened against audit gaps surfaced by red-team review\n\nRun `quickback claude install` to pick up the new skill layout.\n\n---\n\n## v0.10.17 — May 2, 2026\n\n### Security fix: CSP auto-config no longer widens `default-src`\n\nWhen 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`.\n\n0.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.\n\nBefore (0.10.16):\n```\ndefault-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com @trustedOrigins https://api.example.com\n```\n\nAfter (0.10.17):\n```\ndefault-src 'self'\nstyle-src 'self' 'unsafe-inline' https://fonts.googleapis.com\nfont-src 'self' https://fonts.gstatic.com\nconnect-src 'self' @trustedOrigins https://api.example.com\n```\n\n**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.\n\nThe 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.\n\n---\n\n## v0.10.16 — May 2, 2026\n\n### CSP auto-config now covers SPA-baked-in API origins\n\nWhen the bundled CMS or Account SPA is enabled, the compiler already inlines the API URL into the SPA bundle as a string literal at build time (`VITE_QUICKBACK_API_URL=https://${unifiedDomain}`). That hardcoded URL is what the SPA actually fetches — regardless of which origin is currently serving the page. CSP `connect-src` must allow it explicitly.\n\n0.10.16's auto-config picks up every domain the compiler already knows about — `config.domain`, the inferred `quickback.{baseDomain}`, `cms.domain`, `account.domain`, the admin domain — and adds `https://${each}` to `connectSrc` whenever a bundled SPA is enabled.\n\nThe motivating case: running the SPA on `localhost:5173` while it's still baked against `https://quickback.your-app.com`. Pre-0.10.16 the localhost CSP's `'self'` blocked the prod URL; users were patching it manually. Now it just works.\n\n```\n[security] auto-added https://quickback.loop.kardoe.com to csp.connectSrc — account: true → bundled Account SPA → SPA bundle hardcodes https://quickback.loop.kardoe.com as VITE_QUICKBACK_API_URL / etc.\n```\n\n`@trustedOrigins` (the CORS allowlist) is unchanged — it still gets added independently. The two cover different things: `@trustedOrigins` permits CORS-allowed sibling subdomains; the new SPA-baked addition permits the exact URL the SPA's compiled bundle hardcodes.\n\nCombined with 0.10.15's bundled-SPA defaults, most projects can now write the minimal:\n\n```ts\nsecurity: {\n csp: {\n defaultSrc: ['@self'],\n scriptSrc: ['@self'],\n objectSrc: ['@none'],\n upgradeInsecureRequests: true,\n },\n}\n```\n\n…and the compiler fills in styleSrc font hosts, fontSrc gstatic, connectSrc trusted origins, and connectSrc SPA-baked URLs.\n\n---\n\n## v0.10.15 — May 2, 2026\n\n### CSP auto-config — bundled-SPA origins added automatically\n\nWhen `security.csp` is set, the compiler now widens directives **additively** based on the project's enabled features. The four rules:\n\n| Trigger | Auto-added | Directive |\n|---|---|---|\n| `cms: true` OR `account: true` | `'unsafe-inline'`, `https://fonts.googleapis.com` | `styleSrc` |\n| `cms: true` OR `account: true` | `https://fonts.gstatic.com` | `fontSrc` |\n| `csp` set (always) | `@trustedOrigins` | `connectSrc` |\n\nAnything you already wrote stays — auto-config never removes or overrides. Every applied addition prints to stderr at compile so the magic is visible:\n\n```\n[security] auto-added 'unsafe-inline' to csp.styleSrc — account: true → bundled Account SPA → inline style attributes from Tailwind / TanStack Router\n[security] auto-added @trustedOrigins to csp.connectSrc — CORS-trusted origins must be reachable from XHR/fetch (matches cors() allowlist)\n```\n\nThe 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.\n\n**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.\n\n**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.\n\n### Troubleshooting table for CSP violations\n\nThe 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.\n\n### Out of scope (deferred)\n\n- **Per-request CSP nonces** (`@nonce` sentinel implementation) — Phase 2 / 0.10.16. Sentinel still errors at compile in 0.10.15.\n- **`revocationCheck: 'kv'` for `auth.jwt`** — schema accepts it, runtime still errors at compile. Slipped from 0.10.15 to 0.10.16.\n- **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.\n\n---\n\n## v0.10.14 — May 1, 2026\n\n### `auth.jwt` — JWT bearer-token fast-path config\n\nQuickback's bearer-token JWT (the one minted by the auth middleware and consumed by the fast-path on every subsequent request) is now configurable. The most-tuned knob is `expiresIn` — drop it to bound the post-revocation replay window without affecting browser SPAs, which auto-refresh via `set-auth-token` on every authed call:\n\n```ts\nauth: {\n jwt: {\n expiresIn: 30, // 30s post-revocation replay window\n issuer: 'my-api', // iss claim (verified on the way back in)\n audience: 'partner-svc', // aud claim\n secretEnv: 'CUSTOM_JWT_SECRET', // override BETTER_AUTH_SECRET if you need the JWT secret rotated independently\n },\n}\n```\n\n`revocationCheck: 'kv'` (KV-denylist consult on every fast-path verify, ~5-15ms edge-cached, no D1 hit) is reserved in the schema today but **deferred to 0.10.15** — setting it errors at compile so the migration path is explicit. `'none'` (today's behaviour, 0 cost, replay bound by TTL) stays the default.\n\nSee [the docs page](/compiler/config/auth) for the full knob list and tuning recommendations.\n\n### MCP admin endpoints hidden from non-admin `tools/list`\n\nBetter Auth admin endpoints (`/admin/list-users`, `/admin/ban-user`, `/admin/impersonate-user`, etc. — 9 in total) now carry `x-access: { userRole: ['admin'] }` in the generated OpenAPI spec, which means the MCP server's existing access-filter automatically drops them from `tools/list` for callers without an admin token. Anonymous and member-role callers no longer see admin tooling enumerated through MCP; admin endpoints still exist on the HTTP surface (Better Auth gates them server-side regardless).\n\n### Declarative `security` config block\n\nEvery security response-header (`Content-Security-Policy`, `Cross-Origin-Opener-Policy`, `Cross-Origin-Embedder-Policy`, `Cross-Origin-Resource-Policy`, `X-Frame-Options`, `Strict-Transport-Security`, `Referrer-Policy`, `Permissions-Policy`) is now configurable from `quickback.config.ts`. Loop's `postcompile-patch.mjs` (which re-injected a fuller CSP and COOP after every `quickback compile`) can now be deleted in favour of:\n\n```ts\nsecurity: {\n csp: {\n defaultSrc: ['@self'],\n scriptSrc: ['@self'],\n styleSrc: ['@self', '@unsafe-inline'],\n frameAncestors: ['@none'],\n objectSrc: ['@none'],\n upgradeInsecureRequests: true,\n },\n coop: 'same-origin',\n}\n```\n\n`@`-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.\n\nThe 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.\n\nDefaults preserve 0.10.13 behaviour byte-for-byte — adding the block without setting any field is a no-op.\n\nSee [the docs page](/compiler/config/security) for the full reference.\n\n### HSTS no longer pins `localhost` to HTTPS\n\nThe 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.\n\n### Out of scope (deferred)\n\n- **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.\n- **Asset-hash CSP** for inline `<style>` and `<script>` blocks emitted by the bundled SPAs — Phase 3.\n- **Per-route CSP overrides** (e.g. one looser policy for `/admin`) — single global CSP for now.\n\n---\n\n## v0.10.13 — May 1, 2026\n\n### Clickjacking protection on every generated Worker\n\nEvery Worker now emits two clickjacking-defence headers on every\nresponse:\n\n- `Content-Security-Policy: frame-ancestors 'self' <TRUSTED_ORIGINS…>`\n- `X-Frame-Options: SAMEORIGIN`\n\nThe CSP allowlist is sourced from the same `TRUSTED_ORIGINS` constant\nthat gates CORS, so users configure their domains in one place\n(`auth.trustedOrigins` / `auth.trustedOriginDefaults` in\n`quickback.config.ts`) and both CORS and frame-ancestors stay in\nlockstep. `'self'` is always allowed so an app's own SPAs can frame\ntheir own routes (e.g. an account login popover hosted on the same\norigin).\n\nModern browsers obey `frame-ancestors` and ignore `X-Frame-Options`\nwhen both are set; the legacy header is included for clients that\ndon't speak CSP3. The CSP intentionally only sets `frame-ancestors` —\nadding `script-src` / `default-src` would need a much wider audit\nacross SPA assets, inline scripts, and third-party embeds, so that's\nleft as a follow-up.\n\nRecompile (`quickback compile`) and redeploy to pick this up — no\nconfig change needed unless you want to allow extra cross-origin\niframe embeds, in which case add them to `auth.trustedOrigins`.\n\n---\n\n## v0.10.12 — May 1, 2026\n\n### Bundled-docs sync for the MCP recon fix\n\nPatch release that re-bundles the CLI's offline docs (consulted by the\nClaude Code skill, Cursor rules, and other AI assistants) so they\nreflect the corrected `tools/list` access-filter behavior and CORS\nposture shipped in v0.10.11. The `compiler/config/agents.mdx` page\nitself was already corrected on the docs site immediately after the\n0.10.11 release; this bump propagates that text into the bundle inside\n`@quickback-dev/cli`.\n\nNo runtime or compiler behavior change — re-running `quickback compile`\nagainst this version produces the same output as v0.10.11.\n\n---\n\n## v0.10.11 — May 1, 2026\n\n### MCP `tools/list` is now access-filtered + recon-tightened\n\nThe generated MCP-over-HTTP server (`src/routes/mcp.ts`) had three holes\nthat turned a standard pentest into trivial recon:\n\n1. `tools/list` returned the entire tool catalogue to anyone — including\n admin-only endpoints — without checking auth or roles. Tool\n descriptions also leaked sentences like `[UNSAFE] bypasses tenant\n scoping and requires elevated access` verbatim.\n2. The endpoint set `Access-Control-Allow-Origin: *` so any origin could\n pull the catalogue from a browser.\n3. Unauthenticated `GET /mcp` enumerated every tool name in its\n discovery payload.\n\nFix:\n\n- Each tool now carries sanitised access metadata (`_access` covering\n `roles` / `userRole` / `or` / `and`, plus `_public` for `PUBLIC`\n pseudo-role or empty `security`). `tools/list` filters against the\n caller's `ctx` — unauth callers see only `_public` tools, authed\n callers see only role-gated tools they pass. Record predicates and\n function-form access (opaque at list time) are dropped.\n- Wildcard CORS removed entirely. The parent app's `cors()` middleware\n (origin allowlist via `TRUSTED_ORIGINS` + `BETTER_AUTH_URL`) now\n applies uniformly to `/mcp`, same as every other route.\n- `[UNSAFE] ... bypasses tenant scoping ...` flavour text is gone.\n `annotations.destructiveHint` and `_unsafe` remain — those are the\n spec-correct signals for clients to warn users.\n- Unauthenticated `GET /mcp` no longer lists tool names. Inventory is\n only available via the access-filtered `tools/list`.\n\nThis filter is recon-mitigation, not a security boundary: `tools/call`\nstill re-enters the Hono app and runs every middleware (auth, firewall,\naccess, guards, masking), so hiding a tool from list never weakens the\nunderlying gate.\n\nKnown follow-up: Better Auth admin endpoints (`ban-user`, `create-user`,\n`impersonate-user`, etc.) don't yet emit `x-access` in the OpenAPI spec,\nso any logged-in user still sees them in `tools/list` (the actual call\nis still gated by the admin plugin). Tracked separately.\n\n---\n\n## v0.10.10 — April 29, 2026\n\n### Reject reserved keys inside `access.record` at compile time\n\n`access.record` is a flat field map evaluated as implicit AND between\nentries — keys must be column names. Putting `and: [...]` (or `or` /\n`roles` / `userRole`) inside `record` was a real-world footgun: the\nruntime treated the literal string `\"and\"` as a column lookup, the\npredicate failed on every row, and the caller got a silent `403` /\nempty list with nothing pointing at the misuse. The TypeScript type\ncouldn't catch this — `RecordConditions` is an open-ended index\nsignature, so any key parses.\n\nThe compiler now walks every access node attached to a resource (CRUD\nops, `read.access`, view access, masking `show` / `query`, action\naccess) and throws a clear migration error when `record` contains a\nreserved key:\n\n- `and` / `or` inside `record` → use the top-level `and` / `or`\n sibling: `{ and: [{ record: { ... } }, { record: { ... } }] }`\n- `roles` / `userRole` inside `record` → put them at the access node\n alongside `record`: `{ roles: [...], record: { ... } }`\n\nThe error names the exact origin (`crud.update.access`,\n`actions.focus.access.or[1]`, etc.) so the fix lands in the right place.\n\n---\n\n## v0.10.9 — April 29, 2026\n\n### Role hierarchy now expands in record-based action access\n\n`auth.roleHierarchy: ['member', 'admin', 'owner']` plus\n`access: { roles: ['member+'] }` on a record-based action used to\nsilently 403 valid callers. The standalone-action route generator\ninlined the expanded role list as a JSON literal, but the\nrecord-based generator read the access config back through the\nruntime `actions['name'].access` import — the user's source, where\nthe unexpanded `'member+'` shorthand still lived. The runtime did\nliteral string matching against `ctx.roles`, so an `owner` calling\nthe action got `['member+'] !== 'owner'` and was rejected.\n\nFixed: record-based action routes now inline the expanded list the\nsame way standalone routes do. `input` and `execute` still flow\nthrough the runtime import (closures aren't serializable); only the\naccess config is lifted to a JSON literal so the compile-time\nexpansion actually reaches the matcher.\n\nA regression test (`role-hierarchy-action-routes.test.ts`) locks the\nbehavior in — it asserts that `member+` never reaches the route\noutput and that the access config is no longer read from\n`actions[name].access` at runtime.\n\n---\n\n## v0.10.8 — April 29, 2026\n\n### Audit support on postgres targets, plus a generated-API quality pass\n\n**Audit on PG.** Until this release, `audit_events` only existed on cloudflare-d1 — projects on Neon (or any postgres target) silently skipped audit logging on `unsafe:` and `PUBLIC`-role actions, and hard delete was hard-blocked. Postgres has no equivalent of D1's separate-database binding model, but it has native schemas — so the audit table now lives in a dedicated `audit` schema in the same database as features (`drizzle.pgSchema('audit')`). The `hasSecurityAudit` gate accepts D1 OR any PG dialect; the `auditDatabaseId` requirement only fires for D1 (which still uses the separate-binding model). The recruitment example wires `auditDatabaseId` so the recompile path stays green.\n\n**`auditDatabaseId` is now a compile-time requirement** (D1 only). Previously, projects with unsafe/PUBLIC actions but no audit id silently produced a `database_id = \"local-audit\"` placeholder in production `wrangler.toml`; Cloudflare's worker upload step then rejected it with code 10021 *after* assets and migrations had already run. The compile-time error names the exact `wrangler d1 create <project>-audit` command and the `auditDatabaseId` config key where the returned id goes.\n\n### Five fixes from a Loop integration ticket pass\n\n**Action input → OpenAPI / MCP.** `defineAction({ input: z.object({...}) })` schemas now flow into `requestBody` on the OpenAPI operation and `inputSchema.properties` / `_bodyFields` on the MCP tool list. Simple `z.object` shapes are extracted at compile time; for discriminated unions, refinements, recursive schemas, and bare-identifier references (`input: createPersonInput`), the compiler runs your action file through Zod 4's native `z.toJSONSchema()` during compilation — full-fidelity output with no static translator to maintain. Pre-fix, every action came out as a no-arg endpoint, which gutted typed SDK generation and made MCP useless for actions that take parameters.\n\n**OpenAPI fidelity.** Three surgical fixes that strict validators (zod, openapi-typescript, openapi-fetch) had been complaining about:\n- Response schemas now emit `required[]` for every non-nullable column, so generated SDKs treat them as guaranteed-present rather than optional.\n- `text(_, { enum: [...] })` columns emit as closed `{ type: \"string\", enum: [...] }`, narrowing to literal unions.\n- `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.\n\n**Mask auto-detector now checks the column exists.** The auto-mask predicate used to be unconditionally `show: { or: 'owner', roles: ['admin'] }` — including for tables with no owner column at all (no `userId` / `ownerId` and no `q.scope('owner')`). The generated mask function would reference a non-existent column and fail under TypeScript checks. The auto-detector now verifies the resolved owner column exists in the parsed schema before emitting the `or` clause; when it doesn't, the rule falls back to roles-only and the compiler emits a warning so the behavior is transparent.\n\n**Error code consistency.** The generated CRUD layer was emitting raw codes (`'UNAUTHORIZED'`, `'NOT_NULL_VIOLATION'`, `'UNIQUE_VIOLATION'`, `'INSERT_FAILED'`, `'UPDATE_FAILED'`) that were never in the `QuickbackErrorCode` enum, so consumers couldn't switch exhaustively on `code`. New `database` layer + `DB_NOT_NULL_VIOLATION` / `DB_UNIQUE_VIOLATION` / `DB_INSERT_FAILED` / `DB_UPDATE_FAILED` / `NOT_FOUND` codes are now in the enum, the routes use `AuthErrors.missing()` / `DatabaseErrors.*()` helpers throughout, and the OpenAPI `Error` component emits `code` as a closed enum sourced from the canonical `QUICKBACK_ERROR_CODES` list. Generated SDKs can now `switch` on `code` without a default branch swallowing unknown values. See [API errors](/compiler/targets/hono-api/using-the-api/errors#database).\n\n**Dropped dead `auditFields` preamble from action route generators.** The audit wrapper's `Proxy` already hard-stamps `createdAt` / `createdBy` / `modifiedAt` / `modifiedBy` on every INSERT and `modifiedAt` / `modifiedBy` on every UPDATE — the `auditFields` const the route preamble built was never read. Dropped from `standalone.ts` / `record-based.ts` and from the `ActionExecutorParams` JSDoc. Migrated 7 example handlers (drop `modifiedAt: auditFields!.modifiedAt` from `.set` payloads — the wrapper handles it). Note: `.onConflictDoUpdate({ set })` is *not* intercepted by the wrapper, so `upsertBatch`-style handlers keep an explicit `modifiedAt: now`.\n\n---\n\n## One file per action: greenfield action authoring\n\nAction authoring collapses to a single shape. Each action is its own file under `<feature>/actions/<name>.ts` using `defineAction({...})`. The filename is the action name AND the URL segment.\n\n```typescript\n// features/applications/actions/advance.ts\n\nexport default defineAction({\n description: \"Move an application forward in the pipeline\",\n input: z.object({ nextStatus: z.enum([\"screening\", \"interview\", \"offer\"]) }),\n access: { roles: [\"owner\", \"admin\"] },\n transition: {\n field: \"status\",\n via: \"nextStatus\",\n fromTo: { applied: [\"screening\"], screening: [\"interview\"], interview: [\"offer\"] },\n },\n async execute({ db, record, input, auditFields, whereTransition }) { /* … */ },\n});\n```\n\n`defineAction` is imported from a generated per-feature helper at `<feature>/.quickback/define-action.ts` — types `record`, `input`, and audit fields without manual annotations. The directory says what `:id` mounts to; the imports say what the body reads or writes.\n\n**Discovery rules:**\n- `actions/<name>.ts` binds to the feature's primary table (the `<feature>.ts` file at the feature root).\n- `actions/<table>/<name>.ts` binds to the sibling table file `<table>.ts` — for multi-table features.\n- Setting `path:` makes the action standalone (custom URL, no record fetch, no firewall preload).\n- Tableless features (no top-level `*.ts` files) require every action to be standalone.\n- 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)`.\n- 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).\n\n**Retired** (rejected at load time with migration guidance):\n\n- `actions.ts` (bundled multi-action file)\n- `_feature.ts` (shared preamble + tableless actions)\n- `handlers/` directory + `handler:` string ref\n- `defineActions(table, {…})` and `defineActions(null, {…})`\n- `export default { actions: {…} }`\n- Colocated `defineActions` inside table files\n- `standalone: true` flag (presence of `path:` is the new signal)\n- `*-actions.ts` / `*.actions.ts` filename patterns\n\nThe 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.\n\nThe 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.\n\nSee the [Actions docs](/compiler/definitions/actions) for the full reference.\n\n---\n\n## Multi-table actions per feature\n\nFeatures used to support exactly one `defineActions(table, …)` call via `actions.ts`, which forced unnatural feature splits whenever multiple tables in the same feature needed actions (a podcast feature with `episodes`, `shows`, `seasons`, `collections`, etc.). One feature directory can now own actions on multiple tables across three discovery modes:\n\n- **Colocated** (canonical) — `<table>.ts` containing both `defineTable` and `defineActions(<table>, …)`. One file per entity. Default for new features.\n- **`actions.ts`** (existing) — single primary-table actions file at feature root. Unchanged behaviour.\n- **`actions/<table>.ts`** — per-table action files for teams that want strict schema/behavior separation or need to break an import cycle.\n\nPlus the universal `_feature.ts` slot (at feature root) for **non-table-bound feature-level actions** (`export default { actions: { … } }` shape) and **shared Zod schemas** that get prepended once to the merged actions module so every sibling action sees them. Allowed in any of the three modes — orthogonal to table binding.\n\nThe decision flowchart: *one table with actions → colocate. Multiple tables with actions → colocate each. Hit a cycle or want strict separation → `actions/<table>.ts`. Want schema/actions split for a single-table feature → `actions.ts`. Non-table actions → always `_feature.ts`.*\n\nConflicts are batched and printed once before the compiler aborts — no \"fix one, recompile, fix the next\" loop. The CLI hard-errors when a feature mixes `actions.ts` with table-bound mode, when the same table has its `defineActions` declared in two places, when an `actions/<x>.ts` first-arg doesn't match the basename, or when `_feature.ts` contains `defineActions(table, …)`. Legacy `*-actions.ts` / `*.actions.ts` filenames in a feature dir trigger a soft warning naming the offending paths.\n\nWithin the legacy bundled `actions.ts` DSL, action names had to be unique within a feature — the runtime module merged every source into one keyspace, so colliding `publish` actions on `episodes` and `shows` would have silently overwritten each other. The retired `actions.ts` shape is no longer accepted, so this constraint is gone: the current one-file-per-action layout keys uniqueness per `(bindTable, name)` pair, and the codegen aggregator mangles the JS map key per bind-table while keeping the URL segment bare. Sibling-bound `actions/episodes/publish.ts` and `actions/shows/publish.ts` mount at `/episodes/:id/publish` and `/shows/:id/publish` and compile cleanly.\n\nInline `execute:` bodies must be arrow functions (`execute: async (ctx) => { … }`). `async function` and plain `function` shapes were silently misparsed by the route emitter — they now hard-error at parse time pointing at the canonical arrow form, with a suggestion to use `handler:` for callers who genuinely need a named function declaration.\n\n`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.\n\nMigration: 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`.\n\n---\n\n## Firewall: named-scope shape restored, auto-detection synonyms widened\n\nThe named-scope firewall shape (`firewall: { organization: { column: 'tenant_id' } }`) is back as a co-equal user-facing input alongside the predicate array. DSL v2 step 8 had walled it off, but the internal architecture still kept named-scope around for the route + scoped-db generators — so re-accepting it at the input boundary is a thin coercion layer, not an architectural change.\n\n```typescript\n// All three are now valid; all compile to the same predicate array internally.\nfirewall: { organization: { column: 'tenant_id' } } // named-scope (compact)\nfirewall: { owner: { column: 'account_user_id' } }\nfirewall: { exception: true }\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'deletedAt', isNull: true },\n] // predicate array (explicit)\n```\n\nPick 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.\n\n**Auto-detection synonyms expanded.** When `firewall:` is omitted entirely, the compiler scans the schema for an isolation column. The org-scope list now accepts `organizationId`, `organisationId`, `orgId`, `organization`, `organisation`, `org` (American + British). User-scope still accepts `userId` only.\n\n**`ownerId` is now a targeted error signal.** When a table carries `ownerId` but no isolation column AND no explicit `firewall:`, the compiler raises a specific error: `\\`ownerId\\` is business-logic ownership, not access control — Quickback won't auto-derive a firewall from it. Either rename to \\`userId\\` if this column controls access, add a separate \\`userId\\` / \\`organizationId\\` column, or specify \\`firewall:\\` explicitly.` This replaces the generic \"missing isolation column\" error in the `ownerId`-only case and preserves the documented distinction between RLS-style access control (`userId`) and business-logic ownership (`ownerId`).\n\nMigration: 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.\n\n---\n\n## v0.10.0 — April 26, 2026\n\n### `q.scope()` column DSL + unified `masking.query` gate\n\nTwo 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).\n\n**`q.scope(kind)` — single-declaration tenant scoping.** Replaces the three-place pattern (column declaration + firewall predicate + implicit ownership-guard) with one column. `q.scope('organization')` compiles to `text(...).notNull()` and tells the compiler:\n\n1. Auto-derive the firewall predicate (`{ field: 'organizationId', equals: 'ctx.activeOrgId' }`) so the explicit `firewall:` block can be omitted entirely.\n2. Add the column to `GUARDS_CONFIG.systemManaged` so client input is rejected at the guard layer.\n3. Auto-populate from `ctx` on create / upsert.\n\nThe 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.\n\n```typescript\ncolumns: {\n organizationId: q.scope('organization'), // → ctx.activeOrgId\n ownerId: q.scope('owner'), // → ctx.userId\n teamId: q.scope('team'), // → ctx.activeTeamId\n}\n```\n\nThe auto-derived firewall also includes the soft-delete predicate (`{ field: 'deletedAt', isNull: true }`) when audit-field injection is on (the default). See [`q.scope()` in the schema docs](/compiler/definitions/schema#qscope--tenant-scope-columns).\n\n**`masking[col].query.roles` — unified role gate for filter / sort / search.** The three legacy per-capability flags (`filterable`, `searchable`, `sortable`) are replaced by a single allowlist that says \"these roles can query the column.\"\n\n```typescript\nmasking: {\n email: {\n type: 'email',\n show: { roles: ['admin'] },\n query: { roles: ['admin'] }, // optional — defaults to show.roles\n },\n}\n```\n\nWhen omitted, `query` inherits from `show.roles` (\"if you can see it, you can query it\") which is the right shape for almost all PII. A view's own `query.{filterable,searchable,sortable}` allowlist is the opt-in for higher-privileged roles; the existing intersection validator gates it at compile time. See [Masking query gate](/compiler/definitions/masking#query-gate-filter--sort--search).\n\n**Breaking:** Setting `masking[col].filterable / .searchable / .sortable` is rejected at compile time with a migration hint. Replace with `query.roles` (or just delete the flags — `query` defaults to `show.roles`).\n\n---\n\n## v0.9.0 — April 25, 2026\n\n### DSL v2: unified `read:` pipeline, transactional batches, ID-probe defense\n\nStep 8 of the DSL v2 refactor lands. The headline shift is that the read\nside of every resource now has its own block — `read:` — that owns the\ncollection-level `GET /` endpoint, single-record `GET /:id`, and named view\nprojections. The legacy `crud.list` and `crud.get` shapes are rejected at\ncompile time. See the new [Read pipeline](/compiler/definitions/read) page\nfor the full reference and migration table.\n\n**Breaking changes** (compile-time errors with migration hints):\n\n- `crud.list` → [`read.access`](/compiler/definitions/read) (plus `read.pageSize` / `read.maxPageSize`)\n- `crud.get` → `read.access` (single-record GET inherits automatically; use record-level conditions on `read.access` for differentiated single-record gates)\n- Top-level `views: {...}` → [`read.views: {...}`](/compiler/definitions/read#views-under-read-views)\n- `crud.list.fields` / `crud.get.fields` → declare a named view under `read.views` and call `?view={name}` (or `/views/{name}`)\n\n**Pre-record access ordering on `/:id`**: handlers now run a role-only\naccess check **before** the firewall query, so a caller without a matching\nrole gets 403 before the database is touched. This closes the 404-vs-403\nID-probe channel — an unauthorized caller can no longer distinguish \"row\nexists in another tenant\" from \"row doesn't exist.\" See\n[Access evaluation order](/compiler/definitions/access#evaluation-order).\n\n**Transactional batch operations**: batch endpoints now expose a\n`failFast` option (replacing the old `atomic` naming) and a\n`meta.transactional` response field. On tx-supporting providers\n(postgres, supabase, neon, libsql, better-sqlite3, bun-sqlite), `failFast: true`\nwraps the per-record loop in `db.transaction(...)` so any failure rolls\nback the entire batch. On Cloudflare D1 (no `db.transaction`), `failFast: true`\nstill stops on the first error but prior writes stay committed; inspect\n`meta.transactional` to know which guarantee you got. Embedding queue\nmessages and realtime broadcasts are emitted **after** the transaction\ncommits, so a rolled-back batch produces no orphan jobs. See\n[Batch Operations: Transactional semantics](/compiler/targets/hono-api/using-the-api/batch-operations#transactional-semantics).\n\n**`firewallErrorMode` lifted off the firewall block**: the field that\ncontrols 403-vs-404 on firewall misses now lives at the resource top level\n(sibling to `firewall:`), since the firewall config is now a predicate\narray and this is a presentation-layer choice. Existing `firewall.errorMode`\nvalues should be lifted to `firewallErrorMode` at the resource level.\n\n**Read-only resources**: an empty `crud: {}` block (or omitting `crud:`\nentirely) is valid for read-only resources. `read:` alone is enough to\nexpose `GET /` and `GET /:id`.\n\n**Strict-mode top-level keys**: the strict allow-list now includes `dev` so\n`defineConfig({ dev: { ... } })` is accepted at the top level.\n\n---\n\n## v0.8.7 — April 17, 2026\n\n### Security: Hono CVE cluster fix\n\nHono is bumped to `^4.12.14` across the monorepo, the compiler Docker image's pre-installed deps, and every generator path that emits Hono into compiled projects. Older ranges (`^4.0.0` / `^4.5.0` / `^4.6.0` / `^4.7.11`) covered the vulnerable window. Recompile to pick up the fix in your generated project's `package.json`.\n\n### Cloudflare Email Sending is now in public beta\n\nQuickback already defaults to the Workers `send_email` binding for Cloudflare deploys, and Cloudflare Email Sending has now graduated to public beta — production-ready with zero-config, no API keys, no third-party accounts. No action needed; recompiling any existing project continues to wire the default Cloudflare transport. AWS SES remains a fully supported opt-in (`email.provider: 'aws-ses'`) for non-Cloudflare runtimes or existing SES setups. See [Email Configuration](/compiler/config#email-configuration).\n\n### Minor/patch dep sweep\n\nAligned the whole dep surface — monorepo, compiler Docker image, and generator emissions into compiled projects — so new compiles and existing recompiles converge on the same versions:\n\n- `wrangler@^4.83.0`\n- `drizzle-orm@^0.45.2`, `drizzle-kit@^0.31.10`\n- `zod@^4.3.6`\n- `@cloudflare/workers-types@^4.20260417.1` (also deduped — was accidentally declared in both `dependencies` and `devDependencies` in some paths)\n- `@tanstack/react-query@^5.99.0` (Account app)\n\n---\n\n## v0.8.5 — April 15, 2026\n\n### Fix: Better Auth 1.5 and `@cloudflare/workers-types` Compatibility\n\nGenerated API code failed to typecheck after Better Auth bumped to 1.5 and `@cloudflare/workers-types` tightened `BufferSource` to `ArrayBufferView<ArrayBuffer>`. Four unrelated surfaces broke:\n\n- **`databaseHooks.member.update.after` was removed** in Better Auth 1.5. The compiler now emits the member role-change broadcast hook as `organizationHooks.afterUpdateMemberRole` inside the `organization()` plugin call, which is the current supported shape.\n- **`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).\n- **`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.\n- **`crypto.subtle.sign` / `verify`** no longer accept `Uint8Array<ArrayBufferLike>` directly. Generated `jwt.ts` casts encoded payloads to `BufferSource`.\n\nNo config changes required — recompile to pick up the fixes.\n\n### CMS Admin Gate Now Enforced Server-Side\n\n`cms: { access: \"admin\" }` previously only hid the CMS link in Account UI and rendered an \"Access Denied\" screen inside the SPA — the static assets, `/api/v1/schema`, and `/api/v1/custom_view` CRUD were reachable by any authenticated user. A non-admin with an API token or cookie could bypass the UI and read schema metadata or saved CMS views directly.\n\nThis release adds server-side enforcement at every CMS-facing surface:\n\n- **CMS SPA shell** — the Worker checks `ctx.userRole === \"admin\"` before serving `index.html`. Unauthenticated requests redirect to login; authenticated non-admins get `403 Admin access required`. Static bundles (JS/CSS) remain reachable so browser caches aren't invalidated.\n- **`/api/v1/schema`** — returns `403` to non-admins.\n- **`custom_view` CRUD** — now gated on the new `userRole: [\"admin\"]` primitive rather than org membership.\n- **In-SPA gate** — unchanged; defense in depth behind the server-side gates.\n\nYour resource CRUD endpoints are unaffected — they keep their per-resource `crud.access.roles`.\n\n### New `userRole` Access Primitive\n\nAdded `userRole?: string[]` to the declarative `Access` config, evaluated against `ctx.userRole` (the Better Auth admin-plugin `user.role` column). This is distinct from `roles`, which matches `ctx.roles` (org membership).\n\n```typescript\n// Old: in multi-tenant this meant org-admin, not platform-admin\naccess: { roles: ['admin'] }\n\n// New: explicitly require user.role === 'admin' regardless of org membership\naccess: { userRole: ['admin'] }\n\n// \"Org owner OR platform admin\"\naccess: { or: [{ roles: ['owner'] }, { userRole: ['admin'] }] }\n\n// Platform admins see SSNs across every org\nmasking: { ssn: { type: 'ssn', show: { userRole: ['admin'] } } }\n```\n\n`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).\n\n### Fix: `ReferenceError: customAlphabet is not defined` in generated POST handlers\n\nProjects 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.\n\nThe compiler now emits the correct import alongside the ID expression for all three modes: `nanoid`, `customAlphabet`, and `createId` from `@paralleldrive/cuid2`.\n\nNo config changes required — recompile to pick up the fix.\n\n### Fix: Dangling `export const` in generated `actions.ts` breaks `tsc`\n\nWhen a feature authored actions as `export const xActions = defineActions(...)` (instead of `export default defineActions(...)`), the compiler's preamble extractor leaked the assignment's left-hand side into the generated `src/features/<feature>/actions.ts`. The output contained a dangling `export const xActions =` with no right-hand side, and `tsc --noEmit` failed with `TS1109: Expression expected`. Runtime happened to work because the unused placeholder was never evaluated, but typecheck was red.\n\nThe preamble extractor now anchors its boundary to the start of the top-level statement containing `defineActions(...)`, covering `export default`, `export const X =`, `const X =`, and bare call forms. Local Zod helper declarations above the call continue to be preserved.\n\n### Fix: Files worker `database_id` reverted to `\"local-files\"` on every compile\n\nProjects 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.\n\nThe 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.\n\nNo config changes required — recompile and redeploy the files worker.\n\n---\n\n## v0.8.6 — April 16, 2026\n\n### Fix: Audit columns silently dropped from tables with a same-line index callback\n\nTables authored with the composite-index shape Drizzle / prettier produces —\n\n```ts\nexport const episodeTags = sqliteTable(\"episode_tags\", {\n id: text(\"id\").primaryKey(),\n episodeId: text(\"episode_id\").notNull(),\n tagId: text(\"tag_id\").notNull(),\n}, (t) => [ // <-- \"}, (t) =>\" on one line\n uniqueIndex(\"episode_tag_unique\").on(t.episodeId, t.tagId),\n]);\n```\n\nnever 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`.\n\nThe 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.\n\n**Recovery path:**\n\n- 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.\n- 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.\n\n### Fix: `firewall.exception` generated `isNull(<table>.deletedAt)` against a missing column\n\nResources 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`.\n\nThe three concerns are now fully independent:\n\n- **`firewall.exception: true`** — only disables tenant scoping (org/user/team `WHERE` clauses). It does not gate audit fields or soft-delete.\n- **Audit fields** — always injected unless globally opted out. Unchanged.\n- **Soft-delete filter** — emitted only when the schema actually has `deletedAt` *or* the user explicitly set `firewall.softDelete`.\n\nIn 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.\n\nNo config changes required — recompile to pick up the fix.\n\n---\n\n## v0.8.4 — April 14, 2026\n\n### New `generateId: \"short\"` Strategy\n\nAdded a compact ID option for tables where short, shareable codes matter more than collision resistance at scale:\n\n```typescript\nproviders: {\n database: defineDatabase(\"cloudflare-d1\", {\n generateId: \"short\",\n }),\n}\n```\n\nGenerates 6-character alphanumeric IDs (e.g. `a3F9xK`) using nanoid's `customAlphabet` with the full 62-char alphabet (`0-9A-Za-z`). Requires the `nanoid` package in your project (same as the existing `\"nanoid\"` strategy).\n\n**When to use:** room codes, invite links, share URLs, ephemeral records — anywhere the ID appears in a URL or needs to be human-typeable.\n\n**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\"`.\n\nSee [Providers - ID Generation Options](/compiler/config/providers#id-generation-options) for the full list of strategies.\n\n---\n\n## v0.8.3 — April 14, 2026\n\n### Fix: `wrangler.toml` Route Placement and Binding IDs\n\nTwo bugs in the generated `wrangler.toml` that blocked production deployment without manual edits:\n\n**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.\n\n**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:\n\n| Binding | Config sources checked (in order) |\n|---------|-----------------------------------|\n| `AUTH_DB` | `database.config.authDatabaseId` |\n| `DB` | `database.config.featuresDatabaseId`, `database.config.databaseId` |\n| `FILES_DB` | `fileStorage.config.filesDatabaseId`, `database.config.filesDatabaseId` |\n| `KV` | `database.config.kvNamespaceId`, `storage.config.namespaceId`, `auth.config.kvId` |\n\nSee [Providers - Database Options](/compiler/config/providers#database-options) for the full list of supported ID properties.\n\n### Fix: Account SPA Post-Login Redirect on Unified Domain\n\nWhen 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.\n\nThe 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.\n\nNo config changes required — recompile to pick up the fix.\n\n---\n\n## v0.8.2 — April 11, 2026\n\n### Catch-All `VITE_QUICKBACK_URL` Environment Variable\n\nInstead of setting four separate URL env vars, you can now point at a single Quickback origin:\n\n```bash\n# One variable — done.\nVITE_QUICKBACK_URL=https://secure.example.com\n```\n\nWhen set, it's used as a fallback for the individual URLs:\n\n| Individual var (explicit) | Fallback when unset |\n|---|---|\n| `VITE_QUICKBACK_API_URL` | `${VITE_QUICKBACK_URL}` |\n| `VITE_QUICKBACK_ACCOUNT_URL` | `${VITE_QUICKBACK_URL}/account` |\n| `VITE_QUICKBACK_CMS_URL` | `${VITE_QUICKBACK_URL}/cms` |\n\n`VITE_QUICKBACK_APP_URL` stays independent — it points at the tenant's own frontend, not the Quickback server.\n\n**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.\n\nSee [Environment Variables](/stack/account-ui/environment-variables) for the full reference.\n\n---\n\n## v0.8.1 — April 9, 2026\n\n### Role Hierarchy with `+` Suffix\n\nYou can now define a role hierarchy in your config and use the `+` suffix in access rules to mean \"this role and above\":\n\n```typescript\n// quickback.config.ts\nauth: {\n roleHierarchy: ['member', 'admin', 'owner'],\n}\n\n// In resource definitions\ncrud: {\n list: { access: { roles: [\"member+\"] } }, // member, admin, owner\n create: { access: { roles: [\"admin+\"] } }, // admin, owner\n delete: { access: { roles: [\"owner\"] } }, // owner only\n}\n```\n\nRoles are expanded at compile time. No `+` = exact match. See [Access - Role Hierarchy](/compiler/definitions/access#role-hierarchy) for details.\n\n---\n\n## v0.8.0 — April 9, 2026\n\n### Breaking: VITE URL Environment Variables Renamed\n\nAll Quickback-generated URL environment variables are now namespaced under `VITE_QUICKBACK_*` to avoid collisions with other Vite projects.\n\n| Old | New |\n|-----|-----|\n| `VITE_API_URL` | `VITE_QUICKBACK_API_URL` |\n| `VITE_ACCOUNT_URL` | `VITE_QUICKBACK_ACCOUNT_URL` |\n| `VITE_APP_URL` | `VITE_QUICKBACK_APP_URL` |\n| `VITE_CMS_URL` | `VITE_QUICKBACK_CMS_URL` |\n\n**Non-URL variables are unchanged:** `VITE_ENABLE_*` feature flags, branding vars (`VITE_APP_NAME`, etc.), and `VITE_STRIPE_PUBLISHABLE_KEY` stay as-is.\n\n**Action required:**\n- **Compiled projects** — re-run `quickback compile`. The compiler generates the new names automatically.\n- **Standalone deploys** — update `.env`, `.env.production`, and `wrangler.toml` files manually.\n- **Library users** — the `__QUICKBACK_API_URL__` / `__QUICKBACK_APP_URL__` globalThis names are unchanged, but if you pipe Vite env vars into them, update the var names.\n\nSee [Environment Variables](/stack/account-ui/environment-variables) for the full reference.\n\n### CMS Access Control\n\nThe `cms.access` config option now enforces access at the CMS level, not just link visibility in Account UI.\n\n```typescript\ncms: { access: \"admin\" }\n```\n\nWhen 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.\n\nSee [CMS Connecting](/stack/cms/connecting) and [Compiler Config](/compiler/config) for details.\n\n### SPA Sub-Route Fix\n\nFixed a bug where hard-refreshing or directly navigating to SPA sub-routes (e.g., `/account/profile`, `/cms/tables/users`) returned a blank white screen. The Worker now correctly serves `index.html` for all SPA paths, allowing the client-side router to handle routing.\n\n---\n\n## v0.5.11 — February 24, 2026\n\n### Email OTP & Auth Fixes\n\n- Fixed email-OTP magic links not working correctly\n- Removed deprecated `/internal/validate` endpoint — use standard Better Auth session validation instead\n- Auth is now required for all API routes when running locally (previously some routes were unprotected in dev)\n\n### Multiple Table Exports Fix\n\n- Fixed a compiler error when a single file exports multiple Drizzle tables alongside a `defineTable()` default export\n- The CLI now properly detects and reports this with a clear error message pointing to the fix\n\n### Headless Drizzle Rename Hints\n\n- Added `compiler.migrations.renames` configuration for CI/CD environments where Drizzle's interactive rename prompts would block compilation\n- Compile errors now include explicit rename key paths and fail fast on malformed rename config keys\n- See [Configuration](/compiler/config) for details\n\n### Security Contract Report Artifacts\n\n- Added generated security contract artifacts to compiler output:\n - `reports/security-contracts.report.json`\n - `reports/security-contracts.report.sig.json`\n- Added config-driven signing controls:\n - `compiler.securityContracts.report.signature.enabled`\n - `compiler.securityContracts.report.signature.required`\n - `compiler.securityContracts.report.signature.key` / `keyEnv` / `keyId`\n- Missing required signing keys now fail loudly with explicit remediation guidance\n- Added strict config validation for report/signature paths and signing options\n\n### Mandatory Unsafe Action Audit Trail\n\n- Added structured unsafe action config (`unsafe: { reason, adminOnly, crossTenant, targetScope }`)\n- Cross-tenant unsafe actions now require Better Auth authentication plus platform admin role (`ctx.userRole === \"admin\"`)\n- Added mandatory audit logging for unsafe cross-tenant actions (success, denial, and error paths)\n- Cloudflare output now includes optional `AUDIT_DB` wiring, `drizzle.audit.config.ts`, and `db:migrate:audit:*` scripts when unsafe actions are present\n- Added compile-time raw SQL guard for actions and handlers (`allowRawSql: true` required per action)\n\n---\n\n## v0.5.10 — February 19, 2026\n\n### Compiler Page Parsing & CLI Output\n\n- Improved compiler page parsing for `definePage()` definitions\n- Better CLI output formatting during compilation\n- Added `apiPath` to schema registry for CMS integration\n\n### Bug Fixes\n\n- Fixed hyphenated action names not being properly quoted in generated code (e.g., `mark-complete` now generates valid JavaScript)\n- API key authentication (`x-api-key` header) is now handled separately from session tokens (`Bearer` header)\n\n---\n\n## v0.5.9 — February 16, 2026\n\n### CMS Pages & CLI Page Support\n\n- Added `definePage()` support for CMS-managed pages\n- Auth middleware improvements for page routes\n- CLI now supports page definitions alongside table and action definitions\n\n---\n\n## v0.5.8 — February 14, 2026\n\n### CMS App\n\n- Introduced the Quickback CMS — a schema-driven admin panel that connects to your generated API\n- CMS namespace added to actions for admin-specific operations\n- Fixed `guard` → `access` naming inconsistency in CMS action definitions\n\n### Schema Registry & Firewall Improvements\n\n- Added schema registry generator — the compiler now outputs a JSON schema registry used by the CMS\n- Firewall error modes: choose between `reveal` (403 with details) and `hide` (opaque 404) for security-sensitive deployments\n\n### Bug Fixes\n\n- Fixed anonymous user email format generation\n- Organization selector improvements in Account UI\n- Config validation now catches more errors at compile time\n- Better CRUD error handling with structured error responses\n- Fixed masking to use representative star counts instead of fixed formatting\n\n---\n\n## v0.5.7 — February 12, 2026\n\n### Scoped Database for Actions\n\nActions now receive a **security-scoped database** instead of a raw Drizzle instance. The compiler generates a proxy wrapper that automatically enforces org isolation, owner filtering, and soft-delete visibility — the same protections that CRUD routes have always had.\n\nThe scoped DB uses duck-typed column detection at runtime:\n\n| Column Detected | SELECT / UPDATE / DELETE | INSERT |\n|---|---|---|\n| `organizationId` | Adds `WHERE organizationId = ?` | Auto-injects `organizationId` from context |\n| `ownerId` | Adds `WHERE ownerId = ?` | Auto-injects `ownerId` from context |\n| `deletedAt` | Adds `WHERE deletedAt IS NULL` | — |\n\nThis means **every action is secure by default** — no manual `WHERE` clauses needed.\n\n```typescript\ndefineActions(todos, {\n complete: {\n type: \"record\",\n execute: async ({ db, ctx, record, input }) => {\n // db is scoped — only sees records in user's org, excludes soft-deleted\n const siblings = await db.select().from(todos);\n // ↑ automatically filtered to ctx.activeOrgId + deletedAt IS NULL\n },\n },\n});\n```\n\n#### Unsafe Mode\n\nActions that intentionally need to bypass security (admin reports, cross-org queries, migrations) can declare `unsafe: true` to receive a raw, unscoped database handle:\n\n```typescript\ndefineActions(analytics, {\n globalReport: {\n unsafe: true,\n execute: async ({ db, rawDb, ctx, input }) => {\n // db → still scoped (safety net)\n // rawDb → bypasses all security filters\n const allOrgs = await rawDb.select().from(organizations);\n },\n },\n});\n```\n\nWithout `unsafe: true`, `rawDb` is `undefined`.\n\n**Related docs:** [Actions](/compiler/definitions/actions), [Actions API](/compiler/targets/hono-api/using-the-api/actions-api)\n\n---\n\n### Cascading Soft Delete\n\nSoft-deleting a parent record now **automatically cascades** to child and junction tables within the same feature. The compiler detects foreign key references at build time and generates cascade UPDATE statements.\n\n```\nDELETE /api/v1/projects/:id\n```\n\nGenerated behavior:\n```typescript\n// 1. Soft delete the parent\nawait db.update(projects)\n .set({ deletedAt: now, deletedBy: userId })\n .where(eq(projects.id, id));\n\n// 2. Auto-cascade to children (compiler-generated)\nawait db.update(projectMembers)\n .set({ deletedAt: now, deletedBy: userId })\n .where(eq(projectMembers.projectId, id));\n\nawait db.update(projectTasks)\n .set({ deletedAt: now, deletedBy: userId })\n .where(eq(projectTasks.projectId, id));\n```\n\nRules:\n- Only applies to **soft delete** (the default). Hard delete relies on database-level `ON DELETE CASCADE`.\n- Only cascades within the **same feature** — cross-feature references are not affected.\n- Child tables must have `deletedAt` / `deletedBy` columns (auto-added by the compiler's audit fields).\n\n**Related docs:** [Actions API — Cascading Soft Delete](/compiler/targets/hono-api/using-the-api/actions-api#cascading-soft-delete)\n\n---\n\n### Advanced Query Parameters\n\nNew query parameter capabilities for all list endpoints:\n\n- **Field selection** — `?fields=id,name,status` returns only the columns you need\n- **Multi-sort** — `?sort=status:asc,createdAt:desc` sorts by multiple fields\n- **Total count** — `?count=true` returns total matching records in response headers (`X-Total-Count`)\n- **Full-text search** — `?search=keyword` searches across all text columns\n\n```bash\n# Get only names and statuses, sorted by status then date, with total count\nGET /api/v1/todos?fields=id,name,status&sort=status:asc,createdAt:desc&count=true\n\n# Search across all text fields\nGET /api/v1/todos?search=urgent\n```\n\n**Related docs:** [Query Parameters](/compiler/targets/hono-api/using-the-api/query-params)\n\n---\n\n### Audit Field Improvements\n\n- `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\n- All audit fields (`createdAt`, `createdBy`, `modifiedAt`, `modifiedBy`, `deletedAt`, `deletedBy`) are auto-managed\n\n---\n\n## v0.5.6 — February 8, 2026\n\n### Database Naming Conventions\n\n- Default table and column naming changed to **snake_case** with `usePlurals: false`\n- Table names derived from generated Better Auth schema for consistency\n- Removed legacy single-database mode — split databases (auth + features) is now the standard\n\n### Auth Variable Shadowing Fix\n\n- Fixed `member` variable in auth middleware that shadowed the Drizzle `member` table import\n- Renamed to `sessionMember` to avoid conflicts in generated routes\n\n---\n\n## v0.5.5 — February 5, 2026\n\n### Better Auth Plugins\n\n- Published `@quickback-dev/better-auth-upgrade-anonymous` v1.1.0 — post-passkey email collection flow\n- Published `@quickback-dev/better-auth-combo-auth` — combined email + password + OTP authentication\n- Published `@quickback-dev/better-auth-aws-ses` — AWS SES email provider for Better Auth\n\n### OpenAPI Spec Generation\n\n- Generated APIs now include a full OpenAPI specification at `/openapi.json`\n- Better Auth endpoints included in the spec\n- Runtime route: `GET /openapi.json`\n\n### Security Hardening\n\n- Global error handler prevents leaking internal error details\n- Security headers middleware (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)\n- `BETTER_AUTH_SECRET` properly passed to generated config\n\n---\n\n## v0.5.4 — January 30, 2026\n\n### Account UI\n\n- Pre-built authentication UI deployed as Cloudflare Workers\n- Features: sessions, organizations, passkeys, passwordless, admin panel, API keys\n- Dual-mode: standalone (degit template) or embedded with Quickback projects\n\n### Webhook System\n\n- Inbound webhook endpoints with signature verification\n- Outbound webhooks via Cloudflare Queues with automatic retries\n- Configurable per-feature webhook events\n\n### Realtime & Vector Search\n\n- Durable Objects + WebSocket realtime subscriptions\n- Vector embeddings via Cloudflare Vectorize\n- KV and R2 storage integrations\n\n---\n\n## v0.5.0 — January 2026\n\n### Initial Release\n\n- **Quickback Compiler** — TypeScript-first backend compiler\n- **Four Security Pillars** — Firewall, Access, Guards, Masking\n- **`defineTable()`** — Schema + security configuration in a single file\n- **Templates** — Cloudflare Workers, Bun standalone, B2B SaaS\n- **Cloud Compiler** — Remote compilation via `compiler.quickback.dev`\n- **CLI** — `quickback create`, `quickback compile`, `quickback init`\n- **Better Auth Integration** — Organizations, roles, sessions\n- **Drizzle ORM** — Schema-first with automatic migrations\n- **Cloudflare D1** — Split database support (auth + features)"
7
7
  },
8
8
  "compiler/claude-code-skill": {
9
9
  "title": "AI Developer Tools",
@@ -39,7 +39,7 @@ export const DOCS = {
39
39
  },
40
40
  "compiler/config/auth": {
41
41
  "title": "Auth & JWT",
42
- "content": "The top-level `auth` config block holds provider-agnostic auth knobs that affect how Quickback emits the auth middleware, JWT helpers, and access-rule expansion.\n\n```ts title=\"quickback.config.ts\"\nexport default defineConfig({\n // ...\n auth: {\n roleHierarchy: ['member', 'admin', 'owner'],\n jwt: {\n expiresIn: 60,\n issuer: 'my-api',\n // audience, secretEnv, algorithm, revocationCheck...\n },\n },\n});\n```\n\n## `auth.roleHierarchy`\n\nLowest-to-highest privilege list. Lets access rules use `'role+'` shorthand to mean \"this role and above\". Documented in detail under [Access — Role hierarchy](/compiler/definitions/access#role-hierarchy).\n\n## `auth.jwt` — JWT bearer-token fast-path\n\nQuickback ships its own custom HMAC-SHA256 JWT (not Better Auth's JWT plugin) so it can embed `orgId` and `role` claims the fast-path needs to reconstruct `AppContext` without a database round-trip. The signing secret is shared with Better Auth (`BETTER_AUTH_SECRET`) by default — users only manage one secret.\n\n### Behavior recap\n\n1. The browser SPA gets a JWT via the `set-auth-token` response header on every authenticated call.\n2. On subsequent requests the SPA sends `Authorization: Bearer <jwt>`.\n3. The auth middleware's **fast-path** verifies the signature only — no DB query, no session lookup. `AppContext` is reconstructed from JWT claims.\n4. If verification fails (or no JWT is present), the middleware falls back to session auth.\n5. After successful session auth, a fresh JWT is minted and returned via `set-auth-token`. The cycle continues.\n\nThe fast-path is intentionally stateless: it trusts the claims for the full TTL. **Stolen or pre-revocation tokens are valid until they expire.** That's the trade-off the fast-path makes — and the reason `expiresIn` is the most-tuned knob below.\n\n### `expiresIn?: number` — TTL in seconds\n\nDefault `180` (3 minutes).\n\nLowering this shrinks the worst-case window where a stolen / pre-revocation token still works. Browser SPAs auto-refresh via `set-auth-token` on every authed call, so a low TTL is invisible to logged-in users; only stale server-to-server bearer tokens feel it.\n\n```ts\nauth: { jwt: { expiresIn: 30 } } // 30s — tight post-revocation window\nauth: { jwt: { expiresIn: 3600 } } // 1h — longer-lived tokens for CLI / CI\n```\n\n### `issuer?: string` — `iss` claim\n\nDefault omitted.\n\nSet this when other services need to distinguish JWTs minted by this Worker from other issuers. The compiler bakes the issuer into both the mint side (added to claims) and the verify side (rejects tokens with mismatched `iss`).\n\n### `audience?: string` — `aud` claim\n\nDefault omitted.\n\nSet this when this Worker's JWTs are consumed by a sibling service that should reject tokens minted for a different audience. Same mint-and-verify treatment as `issuer`.\n\n### `secretEnv?: string` — signing secret env var\n\nDefault `'BETTER_AUTH_SECRET'`.\n\nOverride this if you want JWT signing isolated from the Better Auth secret (e.g. rotating one without invalidating the other).\n\n```ts\nauth: { jwt: { secretEnv: 'CUSTOM_JWT_SECRET' } }\n```\n\nThe compiler emits `c.env.CUSTOM_JWT_SECRET` (or `process.env.CUSTOM_JWT_SECRET` on Bun/Node) in the auth middleware's verify and mint sites and the `/api/v1/token` endpoint.\n\n> **Note:** the files-worker (separate Worker for R2 access) still reads `BETTER_AUTH_SECRET` directly. If you override `secretEnv`, set both env vars to the same value or the files worker's JWT verification will fall back to DB session lookup. Threading `secretEnv` through the files worker is on the roadmap.\n\n### `algorithm?: 'HS256'`\n\nOnly `HS256` is supported in 0.10.14. `RS256` (asymmetric, public-key verify / private-key sign) is on the roadmap.\n\n### `revocationCheck?: 'none' | 'kv'` — token revocation strategy\n\nDefault `'none'`.\n\n| Value | Behavior | Cost per verify |\n|---|---|---|\n| `'none'` | No revocation check. Stolen tokens valid until TTL expires. Use a low `expiresIn` to bound the replay window. | 0 |\n| `'kv'` | Fast-path consults a denylist KV namespace before accepting the token. Banning a user / revoking sessions writes the user's `sub` to the denylist. | 1 KV read (~5-15ms, edge-cached) |\n\nThe `'kv'` path keeps the fast-path stateless against the auth DB (still 0 D1 queries) — KV reads on Workers are an order of magnitude cheaper than a D1 round trip *and* give sub-second revocation.\n\n> **`'kv'` is deferred to 0.10.15.** Setting `'kv'` in 0.10.14 errors at compile time so the migration path is explicit; the schema accepts it now so users can author their final config today.\n\n## Defaults preserve 0.10.13 behavior\n\nAdding the `auth.jwt` block without setting any field is a no-op vs. the 0.10.13 baseline. Each missing field falls back to its hardcoded value:\n\n| Field | Default |\n|---|---|\n| `expiresIn` | 180 |\n| `issuer` | omitted |\n| `audience` | omitted |\n| `secretEnv` | `'BETTER_AUTH_SECRET'` |\n| `algorithm` | `'HS256'` |\n| `revocationCheck` | `'none'` |\n\n## Tuning recommendations\n\n- **B2C SaaS, mostly browser traffic:** keep defaults. The 180s TTL + auto-refresh model just works.\n- **Pentest engagement / enterprise compliance:** set `expiresIn: 30`. Tokens stay invisible to logged-in users (auto-refreshed every authed call) but stolen-token windows shrink to 30s.\n- **CLI-heavy / long-running CI tokens:** `expiresIn: 3600` for one-hour bearer tokens. Pair with `issuer` / `audience` if multiple services consume the same JWT.\n- **Need immediate revocation:** wait for 0.10.15's `revocationCheck: 'kv'`. Or, today, drop TTL to ~30s — same effect with bounded delay."
42
+ "content": "The top-level `auth` config block holds provider-agnostic auth knobs that affect how Quickback emits the auth middleware, JWT helpers, and access-rule expansion.\n\n```ts title=\"quickback.config.ts\"\nexport default defineConfig({\n // ...\n auth: {\n roleHierarchy: ['member', 'admin', 'owner'],\n jwt: {\n expiresIn: 60,\n issuer: 'my-api',\n // audience, secretEnv, algorithm, revocationCheck...\n },\n },\n});\n```\n\n## `auth.roleHierarchy`\n\nLowest-to-highest privilege list. Lets access rules use `'role+'` shorthand to mean \"this role and above\". Documented in detail under [Access — Role hierarchy](/compiler/definitions/access#role-hierarchy).\n\n## `auth.jwt` — JWT bearer-token fast-path\n\nQuickback ships its own custom HMAC-SHA256 JWT (not Better Auth's JWT plugin) so it can embed `orgId` and `role` claims the fast-path needs to reconstruct `AppContext` without a database round-trip. The signing secret is shared with Better Auth (`BETTER_AUTH_SECRET`) by default — users only manage one secret.\n\n### Behavior recap\n\n1. The browser SPA gets a JWT via the `set-auth-token` response header on every authenticated call.\n2. On subsequent requests the SPA sends `Authorization: Bearer <jwt>`.\n3. The auth middleware's **fast-path** verifies the signature only — no DB query, no session lookup. `AppContext` is reconstructed from JWT claims.\n4. If verification fails (or no JWT is present), the middleware falls back to session auth.\n5. After successful session auth, a fresh JWT is minted and returned via `set-auth-token`. The cycle continues.\n\nThe fast-path is intentionally stateless: it trusts the claims for the full TTL. **Stolen or pre-revocation tokens are valid until they expire.** That's the trade-off the fast-path makes — and the reason `expiresIn` is the most-tuned knob below.\n\n### `expiresIn?: number` — TTL in seconds\n\nDefault `180` (3 minutes).\n\nLowering this shrinks the worst-case window where a stolen / pre-revocation token still works. Browser SPAs auto-refresh via `set-auth-token` on every authed call, so a low TTL is invisible to logged-in users; only stale server-to-server bearer tokens feel it.\n\n```ts\nauth: { jwt: { expiresIn: 30 } } // 30s — tight post-revocation window\nauth: { jwt: { expiresIn: 3600 } } // 1h — longer-lived tokens for CLI / CI\n```\n\n### `issuer?: string` — `iss` claim\n\nDefault omitted.\n\nSet this when other services need to distinguish JWTs minted by this Worker from other issuers. The compiler bakes the issuer into both the mint side (added to claims) and the verify side (rejects tokens with mismatched `iss`).\n\n### `audience?: string` — `aud` claim\n\nDefault omitted.\n\nSet this when this Worker's JWTs are consumed by a sibling service that should reject tokens minted for a different audience. Same mint-and-verify treatment as `issuer`.\n\n### `secretEnv?: string` — signing secret env var\n\nDefault `'BETTER_AUTH_SECRET'`.\n\nOverride this if you want JWT signing isolated from the Better Auth secret (e.g. rotating one without invalidating the other).\n\n```ts\nauth: { jwt: { secretEnv: 'CUSTOM_JWT_SECRET' } }\n```\n\nThe compiler emits `c.env.CUSTOM_JWT_SECRET` (or `process.env.CUSTOM_JWT_SECRET` on Bun/Node) in the auth middleware's verify and mint sites and the `/api/v1/token` endpoint.\n\n> **Note:** the files-worker (separate Worker for R2 access) still reads `BETTER_AUTH_SECRET` directly. If you override `secretEnv`, set both env vars to the same value or the files worker's JWT verification will fall back to DB session lookup. Threading `secretEnv` through the files worker is on the roadmap.\n\n### `algorithm?: 'HS256'`\n\nOnly `HS256` is supported in 0.10.14. `RS256` (asymmetric, public-key verify / private-key sign) is on the roadmap.\n\n### `revocationCheck?: 'none' | 'kv'` — token revocation strategy\n\nDefault `'none'`.\n\n| Value | Behavior | Cost per verify |\n|---|---|---|\n| `'none'` | No revocation check. Stolen tokens valid until TTL expires. Use a low `expiresIn` to bound the replay window. | 0 |\n| `'kv'` | Fast-path consults a denylist KV namespace before accepting the token. Banning a user / revoking sessions writes the user's `sub` to the denylist. | 1 KV read (~5-15ms, edge-cached) |\n\nThe `'kv'` path keeps the fast-path stateless against the auth DB (still 0 D1 queries) — KV reads on Workers are an order of magnitude cheaper than a D1 round trip *and* give sub-second revocation.\n\n> **`'kv'` is deferred to 0.10.15.** Setting `'kv'` in 0.10.14 errors at compile time so the migration path is explicit; the schema accepts it now so users can author their final config today.\n\n## Defaults preserve 0.10.13 behavior\n\nAdding the `auth.jwt` block without setting any field is a no-op vs. the 0.10.13 baseline. Each missing field falls back to its hardcoded value:\n\n| Field | Default |\n|---|---|\n| `expiresIn` | 180 |\n| `issuer` | omitted |\n| `audience` | omitted |\n| `secretEnv` | `'BETTER_AUTH_SECRET'` |\n| `algorithm` | `'HS256'` |\n| `revocationCheck` | `'none'` |\n\n## Tuning recommendations\n\n- **B2C SaaS, mostly browser traffic:** keep defaults. The 180s TTL + auto-refresh model just works.\n- **Pentest engagement / enterprise compliance:** set `expiresIn: 30`. Tokens stay invisible to logged-in users (auto-refreshed every authed call) but stolen-token windows shrink to 30s.\n- **CLI-heavy / long-running CI tokens:** `expiresIn: 3600` for one-hour bearer tokens. Pair with `issuer` / `audience` if multiple services consume the same JWT.\n- **Need immediate revocation:** wait for 0.10.15's `revocationCheck: 'kv'`. Or, today, drop TTL to ~30s — same effect with bounded delay.\n\n## `auth.loginUrl` / `auth.profileUrl` — external sign-in for consumer Workers\n\nWhen a Quickback Worker doesn't host its own Account SPA — e.g. an internal-app mesh where one Worker on the parent domain owns identity (`auth.example.com`) and other Workers share cookies — the compiler-emitted CMS access gates need to redirect unauthenticated visitors to the central sign-in surface, not the local `/account/login` (which doesn't exist there).\n\n```ts title=\"quickback.config.ts\"\nexport default defineConfig({\n // ...\n auth: {\n loginUrl: 'https://auth.example.com/login',\n profileUrl: 'https://auth.example.com/profile',\n },\n});\n```\n\nBoth fields override compiler-emitted browser redirects in the CMS shell:\n\n- **Unauthenticated visitor hits a CMS route** → `302 → <loginUrl>?redirect=<original-url>`\n- **Authenticated user fails the `cms.access: 'admin'` role check** → `302 → <profileUrl>`\n\nThe `?redirect=…` query param is preserved unchanged so the central sign-in surface can bounce the user back after authentication.\n\n### Resolution precedence\n\nMost-specific wins:\n\n1. Explicit `auth.loginUrl` / `auth.profileUrl` — the cookie-trusting consumer-Worker case (this section).\n2. `https://<account.domain>/login` — inferred when this project hosts its own Account SPA on a custom domain.\n3. `/account/login` — built-in fallback, when neither knob is set.\n\n### Independent from `account.domain`\n\n`account.domain` does *two* things: redirect targets *and* hostname-based asset routing for an Account SPA hosted by this project. Consumer Workers don't host Account at all — they only need the URL. `auth.loginUrl` is a redirect-target string with no routing side effects, which is why it's a separate knob.\n\n### When both are set\n\nSetting `auth.loginUrl` *and* `account.domain` is legal — the explicit override beats the inferred URL at the redirect site, while `account.domain` still drives the local Account SPA's hostname routing as usual. Useful when you want to host Account on one custom domain (`account.foo.com`) but redirect *somewhere else* for sign-in (e.g. an SSO surface at `auth.foo.com`)."
43
43
  },
44
44
  "compiler/config/bindings": {
45
45
  "title": "Custom Bindings",
@@ -431,7 +431,7 @@ export const DOCS = {
431
431
  },
432
432
  "stack/realtime/partyserver-rooms": {
433
433
  "title": "PartyServer Rooms",
434
- "content": "When you need **client↔client** state — presence, live cursors, shared notes, concurrent editing — Quickback exposes [PartyServer](https://github.com/cloudflare/partykit) rooms at `/realtime/<binding>/<room-id>`. Each room is its own Durable Object instance, so isolation between rooms is automatic and the runtime hibernates idle rooms for free.\n\nThis is **separate from `/broadcast/v1/*`** (the org-wide server fan-out documented in [Using Realtime](/stack/realtime/using-realtime)). They share the worker and the auth model but solve different problems:\n\n| Concern | `/broadcast/v1/*` | `/realtime/<binding>/<room-id>` |\n|---|---|---|\n| Direction | Server → clients | Client ↔ clients |\n| Sharding | One DO per org | One DO per room |\n| Use case | Postgres-changes, app-wide events | Live cursors, shared edits, presence |\n| Catchup | Ephemeral | Per-room state survives reconnects |\n\n## When to use rooms vs broadcast\n\nReach for rooms when **the messages flow between users in the same context** (interview, document, game match). Reach for broadcast when **the server is publishing facts** that any client in the org may want to react to (a record was updated, a webhook fired, a role changed).\n\nYou can use both in the same project. Cost is the same.\n\n## Define a room class\n\nThe PartyServer `Server` class extends `DurableObject`, so any in-worker DO you wire up via `bindings.durableObjects` qualifies. The lifecycle hooks below are what PartyServer adds on top:\n\n```ts\n// quickback/features/interviews/lib/InterviewRoom.ts\n\nexport class InterviewRoom extends Server {\n static options = { hibernate: true };\n\n presence = new Map<string, { userId?: string; name?: string }>();\n\n onConnect(connection: Connection) {\n this.presence.set(connection.id, {});\n this.broadcastPresence();\n }\n\n onMessage(connection: Connection, message: WSMessage) {\n if (typeof message !== 'string') return;\n const parsed = JSON.parse(message);\n if (parsed.type === 'note') {\n this.broadcast(JSON.stringify({ type: 'note', from: connection.id, body: parsed.body }), [connection.id]);\n }\n }\n\n onClose(connection: Connection) {\n this.presence.delete(connection.id);\n this.broadcastPresence();\n }\n\n private broadcastPresence() {\n const peers = Array.from(this.presence.entries()).map(([id, meta]) => ({ id, ...meta }));\n this.broadcast(JSON.stringify({ type: 'presence', peers }));\n }\n}\n```\n\n## Wire it into your config\n\nOne entry under `bindings.durableObjects` is everything the compiler needs. The Server class lives under a `lib/` directory inside the feature (the same path the compiler uses for any in-worker shared code) — author it at `quickback/features/interviews/lib/InterviewRoom.ts`. The `from` value is the corresponding module path, no extension.\n\n```ts\n// quickback/quickback.config.ts\nexport default defineConfig({\n // ...\n bindings: {\n durableObjects: [\n {\n name: 'INTERVIEW_ROOM',\n className: 'InterviewRoom',\n from: 'features/interviews/lib/InterviewRoom',\n },\n ],\n },\n build: {\n dependencies: {\n partyserver: '^0.5.5',\n partysocket: '^1.1.18',\n },\n },\n});\n```\n\nThe compiler emits the `[[durable_objects.bindings]]` block, the `[[migrations]]` entry (SQLite-backed by default), and the class re-export from `src/index.ts`. **It also auto-mounts the `hono-party` middleware at `/realtime/*`** the moment any in-worker DO is declared, so URL routing follows PartyServer's own convention.\n\n## Connect from the client\n\nThe `partysocket` package handles reconnection, buffering, and resilience. The `party` field is the kebab-cased binding name (`INTERVIEW_ROOM` → `interview-room`); the `room` field is any opaque ID.\n\n```ts\n\nconst socket = new PartySocket({\n host: window.location.host,\n party: 'interview-room',\n room: 'interview-abc123',\n prefix: 'realtime',\n});\n\nsocket.addEventListener('message', (e) => {\n const msg = JSON.parse(e.data);\n if (msg.type === 'presence') updatePresence(msg.peers);\n if (msg.type === 'note') appendNote(msg.from, msg.body);\n});\n\nsocket.send(JSON.stringify({ type: 'note', body: 'asked about tenure' }));\n```\n\n## Authentication\n\nThe auto-mounted middleware is **secure by default** — anonymous WebSocket upgrades are rejected with `401 Unauthorized` before `partyserverMiddleware` sees the request. The four auth mechanisms the rest of the worker honors all unlock connections:\n\n- session cookie\n- `Authorization: Bearer <jwt>`\n- `x-api-key` header\n- `?api_key=` / `?key=` query parameter\n\n(For the hand-written mount form below, you can also accept signed `?ws_ticket=` query params using the same issuer the Broadcaster exposes at `/broadcast/v1/ws-ticket`.)\n\nThe default gate only checks **whether** the caller is authenticated, not whether they're allowed in *this* room. Per-room access (e.g., \"is this user a member of the org that owns interview `<roomId>`?\") is something your `Server` class enforces in `onConnect`, where you have access to the resolved user context.\n\n### Hand-written mount with `onBeforeConnect`\n\nPartyServer also accepts an `onBeforeConnect` hook that runs before the WebSocket upgrade. Reject the upgrade by returning a `Response`; otherwise return `undefined` (or a modified `Request`) and the connection proceeds. Use this when you want a different auth shape than the default — for example, requiring `?ws_ticket=` exclusively (and rejecting raw header / query api-keys), or running per-room checks at the gate instead of in `onConnect`:\n\n```ts\n\napp.use('/realtime/*', partyserverMiddleware({\n options: {\n prefix: 'realtime',\n onBeforeConnect: async (req) => {\n const token = new URL(req.url).searchParams.get('ws_ticket');\n if (!token || !await verifyTicket(token)) {\n return new Response('Unauthorized', { status: 401 });\n }\n },\n },\n}));\n```\n\nThe matching `ws_ticket` issuer is the same one the Broadcaster already uses at `/broadcast/v1/ws-ticket` — generate a ticket from your authenticated UI, pass it as a query param on the WebSocket URL, and verify it inside `onBeforeConnect`. To use this hand-written form, declare a custom route at `/realtime/*` *before* the auto-mount runs (Hono dispatches the first matching middleware) — that lets you opt out of the default auth gate or layer per-room access checks at the upgrade step.\n\n## CRDT-grade document collab (Yjs)\n\nDrop in [`Y-PartyServer`](https://github.com/cloudflare/partykit) when you need true concurrent text/document editing. It's a `Server` subclass that wraps Yjs's sync protocol; everything else above stays the same.\n\n```ts\n\nexport class DocumentRoom extends YServer {\n // Yjs doc lives on `this.doc`; sync protocol is automatic.\n // Override `onLoad()` / `onSave()` to persist to R2 / KV / your DB.\n}\n```\n\n## Why this and not the Broadcaster\n\nThe Broadcaster is a one-DO-per-org fan-out. It can't shard by document, and it doesn't model client→client messages. PartyServer's per-room model is the right primitive for collab; the Broadcaster's per-org model is the right primitive for \"tell everyone in this org that X happened.\" Run both."
434
+ "content": "When you need **client↔client** state — presence, live cursors, shared notes, concurrent editing — Quickback exposes [PartyServer](https://github.com/cloudflare/partykit) rooms at `/realtime/<binding>/<room-id>`. Each room is its own Durable Object instance, so isolation between rooms is automatic and the runtime hibernates idle rooms for free.\n\nThis is **separate from `/broadcast/v1/*`** (the org-wide server fan-out documented in [Using Realtime](/stack/realtime/using-realtime)). They share the worker and the auth model but solve different problems:\n\n| Concern | `/broadcast/v1/*` | `/realtime/<binding>/<room-id>` |\n|---|---|---|\n| Direction | Server → clients | Client ↔ clients |\n| Sharding | One DO per org | One DO per room |\n| Use case | Postgres-changes, app-wide events | Live cursors, shared edits, presence |\n| Catchup | Ephemeral | Per-room state survives reconnects |\n\n## When to use rooms vs broadcast\n\nReach for rooms when **the messages flow between users in the same context** (interview, document, game match). Reach for broadcast when **the server is publishing facts** that any client in the org may want to react to (a record was updated, a webhook fired, a role changed).\n\nYou can use both in the same project. Cost is the same.\n\n## Define a room class\n\nThe PartyServer `Server` class extends `DurableObject`, so any in-worker DO you wire up via `bindings.durableObjects` qualifies. The lifecycle hooks below are what PartyServer adds on top:\n\n```ts\n// quickback/features/interviews/lib/InterviewRoom.ts\n\nexport class InterviewRoom extends Server {\n static options = { hibernate: true };\n\n presence = new Map<string, { userId?: string; name?: string }>();\n\n onConnect(connection: Connection) {\n this.presence.set(connection.id, {});\n this.broadcastPresence();\n }\n\n onMessage(connection: Connection, message: WSMessage) {\n if (typeof message !== 'string') return;\n const parsed = JSON.parse(message);\n if (parsed.type === 'note') {\n this.broadcast(JSON.stringify({ type: 'note', from: connection.id, body: parsed.body }), [connection.id]);\n }\n }\n\n onClose(connection: Connection) {\n this.presence.delete(connection.id);\n this.broadcastPresence();\n }\n\n private broadcastPresence() {\n const peers = Array.from(this.presence.entries()).map(([id, meta]) => ({ id, ...meta }));\n this.broadcast(JSON.stringify({ type: 'presence', peers }));\n }\n}\n```\n\n## Wire it into your config\n\nOne entry under `bindings.durableObjects` is everything the compiler needs. The Server class lives under a `lib/` directory inside the feature (the same path the compiler uses for any in-worker shared code) — author it at `quickback/features/interviews/lib/InterviewRoom.ts`. The `from` value is the corresponding module path, no extension.\n\n```ts\n// quickback/quickback.config.ts\nexport default defineConfig({\n // ...\n bindings: {\n durableObjects: [\n {\n name: 'INTERVIEW_ROOM',\n className: 'InterviewRoom',\n from: 'features/interviews/lib/InterviewRoom',\n },\n ],\n },\n build: {\n dependencies: {\n partyserver: '^0.5.5',\n partysocket: '^1.1.18',\n },\n },\n});\n```\n\nThe compiler emits the `[[durable_objects.bindings]]` block, the `[[migrations]]` entry (SQLite-backed by default), and the class re-export from `src/index.ts`. **It also auto-mounts the `hono-party` middleware at `/realtime/*`** the moment any in-worker DO is declared, so URL routing follows PartyServer's own convention.\n\n## Connect from the client\n\nThe `partysocket` package handles reconnection, buffering, and resilience. The `party` field is the kebab-cased binding name (`INTERVIEW_ROOM` → `interview-room`); the `room` field is any opaque ID.\n\n```ts\n\nconst socket = new PartySocket({\n host: window.location.host,\n party: 'interview-room',\n room: 'interview-abc123',\n prefix: 'realtime',\n});\n\nsocket.addEventListener('message', (e) => {\n const msg = JSON.parse(e.data);\n if (msg.type === 'presence') updatePresence(msg.peers);\n if (msg.type === 'note') appendNote(msg.from, msg.body);\n});\n\nsocket.send(JSON.stringify({ type: 'note', body: 'asked about tenure' }));\n```\n\n## Authentication\n\nThe auto-mounted middleware is **secure by default** — anonymous WebSocket upgrades are rejected with `401 Unauthorized` before `partyserverMiddleware` sees the request. The four auth mechanisms the rest of the worker honors all unlock connections:\n\n- session cookie\n- `Authorization: Bearer <jwt>`\n- `x-api-key` header\n- `?api_key=` / `?key=` query parameter\n\n(For the hand-written mount form below, you can also accept signed `?ws_ticket=` query params using the same issuer the Broadcaster exposes at `/broadcast/v1/ws-ticket`.)\n\nThe default gate only checks **whether** the caller is authenticated, not whether they're allowed in *this* room. For per-room authorization, the `access` field on the binding lets the compiler emit a path-scoped gate that runs your existing resource firewall + `read.access` pipeline before the WebSocket upgrade — no hand-written code, same status semantics as `GET /api/v1/<resource>/:id`.\n\n### Per-room authorization via `access` (v0.12+)\n\n```ts\n// quickback/quickback.config.ts\nbindings: {\n durableObjects: [\n // Single-resource: roomId IS the row id of `chats`.\n // Auto-emits a gate at /realtime/chat/* that runs `chats`'s firewall.\n {\n name: 'Chat', className: 'Chat', from: 'lib/Chat',\n access: { resource: 'chats' },\n },\n\n // Multi-resource: roomId pattern dispatches kind → resource.\n // Auto-emits a gate at /realtime/notepad/* that parses\n // `day-note:<rowId>` | `interaction:<rowId>` | `record:<rowId>`\n // and runs the matched resource's firewall on the rowId.\n {\n name: 'Notepad', className: 'Notepad', from: 'lib/Notepad',\n access: {\n roomId: { pattern: '^(day-note|interaction|record):([A-Za-z0-9_-]+)$', kindGroup: 1, idGroup: 2 },\n resources: {\n 'day-note': { resource: 'day-notes' },\n 'interaction': { resource: 'interactions' },\n 'record': { resource: 'records' },\n },\n },\n },\n\n // Genuinely public room (no auth, no row lookup) — opt out explicitly.\n { name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',\n access: 'public' },\n ],\n}\n```\n\nWhat the compiler emits:\n\n- **`access: { resource: 'chats' }`** — `app.use('/realtime/chat/*', …)` that 401s anonymous, parses the URL segment as a row id, queries `chats` with the resource's `buildFirewallConditions(ctx)` and `eq(chats.id, rowId)`, and 403s when the row is invisible to the caller (out-of-org, soft-deleted, etc.). The DO's `onLoad` / `onConnect` then runs only for rows the user can already read.\n- **Multi-resource form** — same gate but with a regex parser dispatching to per-kind firewall lookups. Unknown kinds 400 at the gate.\n- **`access: 'public'`** — `app.use('/realtime/<kebab>/*', …)` that just passes through. Use for anonymous game lobbies / public collab pads where the room itself is the unit of access.\n- **No `access` declared** — falls through to the catchall `/realtime/*` gate that just checks `ctx.authenticated`. (v0.11.1 behavior.)\n\nCompile-time validation: every `resource` / `resources[].resource` value is checked against the project's feature names so typos surface as build errors, not as runtime 400s on the first WS upgrade.\n\n### Hand-written mount with `onBeforeConnect`\n\nPartyServer also accepts an `onBeforeConnect` hook that runs before the WebSocket upgrade. Reject the upgrade by returning a `Response`; otherwise return `undefined` (or a modified `Request`) and the connection proceeds. Use this when you want a different auth shape than the default — for example, requiring `?ws_ticket=` exclusively (and rejecting raw header / query api-keys), or running per-room checks at the gate instead of in `onConnect`:\n\n```ts\n\napp.use('/realtime/*', partyserverMiddleware({\n options: {\n prefix: 'realtime',\n onBeforeConnect: async (req) => {\n const token = new URL(req.url).searchParams.get('ws_ticket');\n if (!token || !await verifyTicket(token)) {\n return new Response('Unauthorized', { status: 401 });\n }\n },\n },\n}));\n```\n\nThe matching `ws_ticket` issuer is the same one the Broadcaster already uses at `/broadcast/v1/ws-ticket` — generate a ticket from your authenticated UI, pass it as a query param on the WebSocket URL, and verify it inside `onBeforeConnect`. To use this hand-written form, declare a custom route at `/realtime/*` *before* the auto-mount runs (Hono dispatches the first matching middleware) — that lets you opt out of the default auth gate or layer per-room access checks at the upgrade step.\n\n## CRDT-grade document collab (Yjs)\n\nDrop in [`Y-PartyServer`](https://github.com/cloudflare/partykit) when you need true concurrent text/document editing. It's a `Server` subclass that wraps Yjs's sync protocol; everything else above stays the same.\n\n```ts\n\nexport class DocumentRoom extends YServer {\n // Yjs doc lives on `this.doc`; sync protocol is automatic.\n // Override `onLoad()` / `onSave()` to persist to R2 / KV / your DB.\n}\n```\n\n## Why this and not the Broadcaster\n\nThe Broadcaster is a one-DO-per-org fan-out. It can't shard by document, and it doesn't model client→client messages. PartyServer's per-room model is the right primitive for collab; the Broadcaster's per-org model is the right primitive for \"tell everyone in this org that X happened.\" Run both."
435
435
  },
436
436
  "stack/realtime/using-realtime": {
437
437
  "title": "Using Realtime",
@@ -1 +1 @@
1
- {"version":3,"file":"content.js","sourceRoot":"","sources":["../../src/docs/content.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,0DAA0D;AAO1D,MAAM,CAAC,MAAM,IAAI,GAA6B;IAC5C,WAAW,EAAE;QACX,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,m2zEAAm2zE;KAC/2zE;IACD,4BAA4B,EAAE;QAC5B,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,giRAAgiR;KAC5iR;IACD,wCAAwC,EAAE;QACxC,OAAO,EAAE,gBAAgB;QACz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;IACvB,cAAc;IACd,2BAA2B;IAC3B,gCAAgC;IAChC,gBAAgB;IAChB,kCAAkC;IAClC,+BAA+B;IAC/B,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,cAAc;IACd,+BAA+B;IAC/B,wBAAwB;IACxB,gBAAgB;IAChB,yBAAyB;CAC1B,CAAC"}
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../../src/docs/content.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,0DAA0D;AAO1D,MAAM,CAAC,MAAM,IAAI,GAA6B;IAC5C,WAAW,EAAE;QACX,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,k92EAAk92E;KAC992E;IACD,4BAA4B,EAAE;QAC5B,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,giRAAgiR;KAC5iR;IACD,wCAAwC,EAAE;QACxC,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,2nEAA2nE;KACvoE;IACD,6BAA6B,EAAE;QAC7B,OAAO,EAAE,eAAe;QACxB,SAAS,EAAE,upQAAupQ;KACnqQ;IACD,mCAAmC,EAAE;QACnC,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,iuGAAiuG;KAC7uG;IACD,yBAAyB,EAAE;QACzB,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,w4EAAw4E;KACp5E;IACD,wCAAwC,EAAE;QACxC,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,+tFAA+tF;KAC3uF;IACD,yCAAyC,EAAE;QACzC,OAAO,EAAE,iBAAiB;QAC1B,SAAS,EAAE,k/DAAk/D;KAC9/D;IACD,wBAAwB,EAAE;QACxB,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,w+MAAw+M;KACp/M;IACD,sBAAsB,EAAE;QACtB,OAAO,EAAE,YAAY;QACrB,SAAS,EAAE,sqPAAsqP;KAClrP;IACD,0BAA0B,EAAE;QAC1B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C1B,OAAO;IACP,gCAAgC;IAChC,wCAAwC;IACxC,iCAAiC;IACjC,oCAAoC;IACpC,mCAAmC;IACnC,yCAAyC;IACzC,2BAA2B;IAC3B,yCAAyC;IACzC,oCAAoC;IACpC,wCAAwC;IACxC,oCAAoC;IACpC,wBAAwB;IACxB,kBAAkB;IAClB,gCAAgC;IAChC,6BAA6B;IAC7B,iCAAiC;IACjC,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,6BAA6B;IAC7B,4BAA4B;IAC5B,+BAA+B;IAC/B,oBAAoB;IACpB,sCAAsC;IACtC,qBAAqB;IACrB,uBAAuB;IACvB,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,WAAW;IACX,0BAA0B;IAC1B,iBAAiB;IACjB,0BAA0B;IAC1B,yBAAyB;IACzB,2BAA2B;IAC3B,oBAAoB;IACpB,uBAAuB;IACvB,OAAO;IACP,uBAAuB;IACvB,cAAc;IACd,2BAA2B;IAC3B,gCAAgC;IAChC,gBAAgB;IAChB,kCAAkC;IAClC,+BAA+B;IAC/B,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,cAAc;IACd,+BAA+B;IAC/B,wBAAwB;IACxB,gBAAgB;IAChB,yBAAyB;CAC1B,CAAC"}
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import pc from "picocolors";
12
12
  // Version injected at build time by scripts/inject-version.ts
13
- const CLI_VERSION = "0.11.1";
13
+ const CLI_VERSION = "0.13.0";
14
14
  function getPackageVersion() {
15
15
  return CLI_VERSION;
16
16
  }
@@ -4,6 +4,39 @@ Release notes for the Quickback compiler, CLI, and platform.
4
4
 
5
5
  ---
6
6
 
7
+ ## v0.12.0 — May 5, 2026
8
+
9
+ ### Per-room authorization for PartyServer rooms
10
+
11
+ `bindings.durableObjects[].access` lets the compiler emit a path-scoped gate that runs the declared resource's existing firewall + `read.access` pipeline before the WebSocket upgrade — same pillars `GET /api/v1/<resource>/:id` enforces, zero hand-written auth code.
12
+
13
+ ```ts
14
+ durableObjects: [
15
+ // Single-resource: roomId IS the chat row id.
16
+ { name: 'Chat', className: 'Chat', from: 'lib/Chat',
17
+ access: { resource: 'chats' } },
18
+
19
+ // Multi-resource: regex dispatches kind → resource.
20
+ { name: 'Notepad', className: 'Notepad', from: 'lib/Notepad',
21
+ access: {
22
+ roomId: { pattern: '^(day-note|interaction|record):([A-Za-z0-9_-]+)$', kindGroup: 1, idGroup: 2 },
23
+ resources: {
24
+ 'day-note': { resource: 'day-notes' },
25
+ 'interaction': { resource: 'interactions' },
26
+ 'record': { resource: 'records' },
27
+ },
28
+ } },
29
+
30
+ // Anonymous game lobbies / public pads: explicit opt-out.
31
+ { name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',
32
+ access: 'public' },
33
+ ],
34
+ ```
35
+
36
+ The gate 401s unauthenticated callers, 403s when the firewall hides the row, 404s when the row is missing, and lets the upgrade proceed otherwise. DOs without an `access` declaration keep the v0.11.1 catchall (just `ctx.authenticated`). Resource references are validated against feature names at compile time so typos break the build, not the first WebSocket upgrade. See [PartyServer Rooms → Per-room authorization via access](/stack/realtime/partyserver-rooms#per-room-authorization-via-access-v012).
37
+
38
+ ---
39
+
7
40
  ## v0.11.1 — May 5, 2026
8
41
 
9
42
  ### PartyServer auto-mount is now secure by default
@@ -107,3 +107,40 @@ Adding the `auth.jwt` block without setting any field is a no-op vs. the 0.10.13
107
107
  - **Pentest engagement / enterprise compliance:** set `expiresIn: 30`. Tokens stay invisible to logged-in users (auto-refreshed every authed call) but stolen-token windows shrink to 30s.
108
108
  - **CLI-heavy / long-running CI tokens:** `expiresIn: 3600` for one-hour bearer tokens. Pair with `issuer` / `audience` if multiple services consume the same JWT.
109
109
  - **Need immediate revocation:** wait for 0.10.15's `revocationCheck: 'kv'`. Or, today, drop TTL to ~30s — same effect with bounded delay.
110
+
111
+ ## `auth.loginUrl` / `auth.profileUrl` — external sign-in for consumer Workers
112
+
113
+ When a Quickback Worker doesn't host its own Account SPA — e.g. an internal-app mesh where one Worker on the parent domain owns identity (`auth.example.com`) and other Workers share cookies — the compiler-emitted CMS access gates need to redirect unauthenticated visitors to the central sign-in surface, not the local `/account/login` (which doesn't exist there).
114
+
115
+ ```ts title="quickback.config.ts"
116
+ export default defineConfig({
117
+ // ...
118
+ auth: {
119
+ loginUrl: 'https://auth.example.com/login',
120
+ profileUrl: 'https://auth.example.com/profile',
121
+ },
122
+ });
123
+ ```
124
+
125
+ Both fields override compiler-emitted browser redirects in the CMS shell:
126
+
127
+ - **Unauthenticated visitor hits a CMS route** → `302 → <loginUrl>?redirect=<original-url>`
128
+ - **Authenticated user fails the `cms.access: 'admin'` role check** → `302 → <profileUrl>`
129
+
130
+ The `?redirect=…` query param is preserved unchanged so the central sign-in surface can bounce the user back after authentication.
131
+
132
+ ### Resolution precedence
133
+
134
+ Most-specific wins:
135
+
136
+ 1. Explicit `auth.loginUrl` / `auth.profileUrl` — the cookie-trusting consumer-Worker case (this section).
137
+ 2. `https://<account.domain>/login` — inferred when this project hosts its own Account SPA on a custom domain.
138
+ 3. `/account/login` — built-in fallback, when neither knob is set.
139
+
140
+ ### Independent from `account.domain`
141
+
142
+ `account.domain` does *two* things: redirect targets *and* hostname-based asset routing for an Account SPA hosted by this project. Consumer Workers don't host Account at all — they only need the URL. `auth.loginUrl` is a redirect-target string with no routing side effects, which is why it's a separate knob.
143
+
144
+ ### When both are set
145
+
146
+ Setting `auth.loginUrl` *and* `account.domain` is legal — the explicit override beats the inferred URL at the redirect site, while `account.domain` still drives the local Account SPA's hostname routing as usual. Useful when you want to host Account on one custom domain (`account.foo.com`) but redirect *somewhere else* for sign-in (e.g. an SSO surface at `auth.foo.com`).
@@ -117,7 +117,52 @@ The auto-mounted middleware is **secure by default** — anonymous WebSocket upg
117
117
 
118
118
  (For the hand-written mount form below, you can also accept signed `?ws_ticket=` query params using the same issuer the Broadcaster exposes at `/broadcast/v1/ws-ticket`.)
119
119
 
120
- The default gate only checks **whether** the caller is authenticated, not whether they're allowed in *this* room. Per-room access (e.g., "is this user a member of the org that owns interview `<roomId>`?") is something your `Server` class enforces in `onConnect`, where you have access to the resolved user context.
120
+ The default gate only checks **whether** the caller is authenticated, not whether they're allowed in *this* room. For per-room authorization, the `access` field on the binding lets the compiler emit a path-scoped gate that runs your existing resource firewall + `read.access` pipeline before the WebSocket upgrade — no hand-written code, same status semantics as `GET /api/v1/<resource>/:id`.
121
+
122
+ ### Per-room authorization via `access` (v0.12+)
123
+
124
+ ```ts
125
+ // quickback/quickback.config.ts
126
+ bindings: {
127
+ durableObjects: [
128
+ // Single-resource: roomId IS the row id of `chats`.
129
+ // Auto-emits a gate at /realtime/chat/* that runs `chats`'s firewall.
130
+ {
131
+ name: 'Chat', className: 'Chat', from: 'lib/Chat',
132
+ access: { resource: 'chats' },
133
+ },
134
+
135
+ // Multi-resource: roomId pattern dispatches kind → resource.
136
+ // Auto-emits a gate at /realtime/notepad/* that parses
137
+ // `day-note:<rowId>` | `interaction:<rowId>` | `record:<rowId>`
138
+ // and runs the matched resource's firewall on the rowId.
139
+ {
140
+ name: 'Notepad', className: 'Notepad', from: 'lib/Notepad',
141
+ access: {
142
+ roomId: { pattern: '^(day-note|interaction|record):([A-Za-z0-9_-]+)$', kindGroup: 1, idGroup: 2 },
143
+ resources: {
144
+ 'day-note': { resource: 'day-notes' },
145
+ 'interaction': { resource: 'interactions' },
146
+ 'record': { resource: 'records' },
147
+ },
148
+ },
149
+ },
150
+
151
+ // Genuinely public room (no auth, no row lookup) — opt out explicitly.
152
+ { name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',
153
+ access: 'public' },
154
+ ],
155
+ }
156
+ ```
157
+
158
+ What the compiler emits:
159
+
160
+ - **`access: { resource: 'chats' }`** — `app.use('/realtime/chat/*', …)` that 401s anonymous, parses the URL segment as a row id, queries `chats` with the resource's `buildFirewallConditions(ctx)` and `eq(chats.id, rowId)`, and 403s when the row is invisible to the caller (out-of-org, soft-deleted, etc.). The DO's `onLoad` / `onConnect` then runs only for rows the user can already read.
161
+ - **Multi-resource form** — same gate but with a regex parser dispatching to per-kind firewall lookups. Unknown kinds 400 at the gate.
162
+ - **`access: 'public'`** — `app.use('/realtime/<kebab>/*', …)` that just passes through. Use for anonymous game lobbies / public collab pads where the room itself is the unit of access.
163
+ - **No `access` declared** — falls through to the catchall `/realtime/*` gate that just checks `ctx.authenticated`. (v0.11.1 behavior.)
164
+
165
+ Compile-time validation: every `resource` / `resources[].resource` value is checked against the project's feature names so typos surface as build errors, not as runtime 400s on the first WS upgrade.
121
166
 
122
167
  ### Hand-written mount with `onBeforeConnect`
123
168
 
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,CAAC;IAC/C,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;CACxB;AAKD;;GAEG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAYlF;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAY1E;AAED,eAA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kB,CAmEhE,CAAC;AAKF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQnD,CAAC;AAEF,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAG/E;AAED,wBAAgB,aAAa,IAAI,kBAAkB,EAAE,CAEpD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C;AAED,wBAAgB,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEpD;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAgB3C"}
@@ -42,7 +42,7 @@ export const TEMPLATE_REGISTRY = {
42
42
  // Free tier templates
43
43
  "betterauth-d1-cloudflare": {
44
44
  name: "Better Auth + D1 + Cloudflare",
45
- description: "Authentication with Better Auth, D1 database, deployed to Cloudflare Workers",
45
+ description: "Authentication with Better Auth, D1 database, deployed to Cloudflare Workers — bare scaffold, add your own features",
46
46
  category: "auth",
47
47
  tags: ["auth", "cloudflare", "d1", "hono"],
48
48
  author: "quickback",
@@ -52,6 +52,18 @@ export const TEMPLATE_REGISTRY = {
52
52
  requiresCloudflare: true,
53
53
  tier: "free",
54
54
  },
55
+ "todos-cloudflare": {
56
+ name: "Todos Example (Cloudflare)",
57
+ description: "Working todos example — schema with masking, two record-based actions (complete / uncomplete), Better Auth, D1. Read the source as a learning template.",
58
+ category: "api",
59
+ tags: ["example", "todos", "actions", "cloudflare", "d1"],
60
+ author: "quickback",
61
+ version: "1.0.0",
62
+ includes: ["betterauth", "d1", "hono", "drizzle"],
63
+ preset: "cloudflare",
64
+ requiresCloudflare: true,
65
+ tier: "free",
66
+ },
55
67
  // bun template hidden — see apps/compiler/src/providers/runtime/providers/bun/README.md
56
68
  // → "Known Issues" for the list of generator drift bugs blocking it.
57
69
  // Pro tier templates
@@ -102,6 +114,7 @@ export const TEMPLATE_ALIASES = {
102
114
  "cf": "betterauth-d1-cloudflare",
103
115
  "saas": "b2bsaas-cloudflare",
104
116
  "blog": "blog-cloudflare",
117
+ "todos": "todos-cloudflare",
105
118
  "empty": "empty-cloudflare",
106
119
  "scaffold": "empty-cloudflare",
107
120
  };
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAqB,MAAM,sBAAsB,CAAC;AAezE,6BAA6B;AAC7B,IAAI,oBAAoB,GAAwC,IAAI,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACtC,IAAI,oBAAoB,EAAE,CAAC;QACvB,OAAO,oBAAoB,CAAC;IAChC,CAAC;IAED,IAAI,CAAC;QACD,oBAAoB,GAAG,MAAM,cAAc,EAAE,CAAC;QAC9C,OAAO,oBAAoB,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACL,6BAA6B;QAC7B,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,YAAoB;IACpD,MAAM,eAAe,GAAG,MAAM,oBAAoB,EAAE,CAAC;IACrD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC;IAEhE,qBAAqB;IACrB,IAAI,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC;IACpD,CAAC;IAED,oBAAoB;IACpB,MAAM,KAAK,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC1C,OAAO,KAAK,EAAE,IAAI,KAAK,KAAK,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAuC;IACjE,sBAAsB;IACtB,0BAA0B,EAAE;QACxB,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,8EAA8E;QAC3F,QAAQ,EAAE,MAAM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AAC,EAAE,CAAC;QAC7D,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,OAAO,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quickback-dev/cli",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "description": "CLI for Quickback — define your backend in TypeScript, compile to a fully wired Cloudflare Worker (or Bun / Node) with auth, database, migrations, security, CMS, and Account UI.",
5
5
  "author": "Kardoe Incorporated <paul@kardoe.com>",
6
6
  "license": "MIT",
@@ -4,6 +4,39 @@ Release notes for the Quickback compiler, CLI, and platform.
4
4
 
5
5
  ---
6
6
 
7
+ ## v0.12.0 — May 5, 2026
8
+
9
+ ### Per-room authorization for PartyServer rooms
10
+
11
+ `bindings.durableObjects[].access` lets the compiler emit a path-scoped gate that runs the declared resource's existing firewall + `read.access` pipeline before the WebSocket upgrade — same pillars `GET /api/v1/<resource>/:id` enforces, zero hand-written auth code.
12
+
13
+ ```ts
14
+ durableObjects: [
15
+ // Single-resource: roomId IS the chat row id.
16
+ { name: 'Chat', className: 'Chat', from: 'lib/Chat',
17
+ access: { resource: 'chats' } },
18
+
19
+ // Multi-resource: regex dispatches kind → resource.
20
+ { name: 'Notepad', className: 'Notepad', from: 'lib/Notepad',
21
+ access: {
22
+ roomId: { pattern: '^(day-note|interaction|record):([A-Za-z0-9_-]+)$', kindGroup: 1, idGroup: 2 },
23
+ resources: {
24
+ 'day-note': { resource: 'day-notes' },
25
+ 'interaction': { resource: 'interactions' },
26
+ 'record': { resource: 'records' },
27
+ },
28
+ } },
29
+
30
+ // Anonymous game lobbies / public pads: explicit opt-out.
31
+ { name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',
32
+ access: 'public' },
33
+ ],
34
+ ```
35
+
36
+ The gate 401s unauthenticated callers, 403s when the firewall hides the row, 404s when the row is missing, and lets the upgrade proceed otherwise. DOs without an `access` declaration keep the v0.11.1 catchall (just `ctx.authenticated`). Resource references are validated against feature names at compile time so typos break the build, not the first WebSocket upgrade. See [PartyServer Rooms → Per-room authorization via access](/stack/realtime/partyserver-rooms#per-room-authorization-via-access-v012).
37
+
38
+ ---
39
+
7
40
  ## v0.11.1 — May 5, 2026
8
41
 
9
42
  ### PartyServer auto-mount is now secure by default
@@ -107,3 +107,40 @@ Adding the `auth.jwt` block without setting any field is a no-op vs. the 0.10.13
107
107
  - **Pentest engagement / enterprise compliance:** set `expiresIn: 30`. Tokens stay invisible to logged-in users (auto-refreshed every authed call) but stolen-token windows shrink to 30s.
108
108
  - **CLI-heavy / long-running CI tokens:** `expiresIn: 3600` for one-hour bearer tokens. Pair with `issuer` / `audience` if multiple services consume the same JWT.
109
109
  - **Need immediate revocation:** wait for 0.10.15's `revocationCheck: 'kv'`. Or, today, drop TTL to ~30s — same effect with bounded delay.
110
+
111
+ ## `auth.loginUrl` / `auth.profileUrl` — external sign-in for consumer Workers
112
+
113
+ When a Quickback Worker doesn't host its own Account SPA — e.g. an internal-app mesh where one Worker on the parent domain owns identity (`auth.example.com`) and other Workers share cookies — the compiler-emitted CMS access gates need to redirect unauthenticated visitors to the central sign-in surface, not the local `/account/login` (which doesn't exist there).
114
+
115
+ ```ts title="quickback.config.ts"
116
+ export default defineConfig({
117
+ // ...
118
+ auth: {
119
+ loginUrl: 'https://auth.example.com/login',
120
+ profileUrl: 'https://auth.example.com/profile',
121
+ },
122
+ });
123
+ ```
124
+
125
+ Both fields override compiler-emitted browser redirects in the CMS shell:
126
+
127
+ - **Unauthenticated visitor hits a CMS route** → `302 → <loginUrl>?redirect=<original-url>`
128
+ - **Authenticated user fails the `cms.access: 'admin'` role check** → `302 → <profileUrl>`
129
+
130
+ The `?redirect=…` query param is preserved unchanged so the central sign-in surface can bounce the user back after authentication.
131
+
132
+ ### Resolution precedence
133
+
134
+ Most-specific wins:
135
+
136
+ 1. Explicit `auth.loginUrl` / `auth.profileUrl` — the cookie-trusting consumer-Worker case (this section).
137
+ 2. `https://<account.domain>/login` — inferred when this project hosts its own Account SPA on a custom domain.
138
+ 3. `/account/login` — built-in fallback, when neither knob is set.
139
+
140
+ ### Independent from `account.domain`
141
+
142
+ `account.domain` does *two* things: redirect targets *and* hostname-based asset routing for an Account SPA hosted by this project. Consumer Workers don't host Account at all — they only need the URL. `auth.loginUrl` is a redirect-target string with no routing side effects, which is why it's a separate knob.
143
+
144
+ ### When both are set
145
+
146
+ Setting `auth.loginUrl` *and* `account.domain` is legal — the explicit override beats the inferred URL at the redirect site, while `account.domain` still drives the local Account SPA's hostname routing as usual. Useful when you want to host Account on one custom domain (`account.foo.com`) but redirect *somewhere else* for sign-in (e.g. an SSO surface at `auth.foo.com`).
@@ -117,7 +117,52 @@ The auto-mounted middleware is **secure by default** — anonymous WebSocket upg
117
117
 
118
118
  (For the hand-written mount form below, you can also accept signed `?ws_ticket=` query params using the same issuer the Broadcaster exposes at `/broadcast/v1/ws-ticket`.)
119
119
 
120
- The default gate only checks **whether** the caller is authenticated, not whether they're allowed in *this* room. Per-room access (e.g., "is this user a member of the org that owns interview `<roomId>`?") is something your `Server` class enforces in `onConnect`, where you have access to the resolved user context.
120
+ The default gate only checks **whether** the caller is authenticated, not whether they're allowed in *this* room. For per-room authorization, the `access` field on the binding lets the compiler emit a path-scoped gate that runs your existing resource firewall + `read.access` pipeline before the WebSocket upgrade — no hand-written code, same status semantics as `GET /api/v1/<resource>/:id`.
121
+
122
+ ### Per-room authorization via `access` (v0.12+)
123
+
124
+ ```ts
125
+ // quickback/quickback.config.ts
126
+ bindings: {
127
+ durableObjects: [
128
+ // Single-resource: roomId IS the row id of `chats`.
129
+ // Auto-emits a gate at /realtime/chat/* that runs `chats`'s firewall.
130
+ {
131
+ name: 'Chat', className: 'Chat', from: 'lib/Chat',
132
+ access: { resource: 'chats' },
133
+ },
134
+
135
+ // Multi-resource: roomId pattern dispatches kind → resource.
136
+ // Auto-emits a gate at /realtime/notepad/* that parses
137
+ // `day-note:<rowId>` | `interaction:<rowId>` | `record:<rowId>`
138
+ // and runs the matched resource's firewall on the rowId.
139
+ {
140
+ name: 'Notepad', className: 'Notepad', from: 'lib/Notepad',
141
+ access: {
142
+ roomId: { pattern: '^(day-note|interaction|record):([A-Za-z0-9_-]+)$', kindGroup: 1, idGroup: 2 },
143
+ resources: {
144
+ 'day-note': { resource: 'day-notes' },
145
+ 'interaction': { resource: 'interactions' },
146
+ 'record': { resource: 'records' },
147
+ },
148
+ },
149
+ },
150
+
151
+ // Genuinely public room (no auth, no row lookup) — opt out explicitly.
152
+ { name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',
153
+ access: 'public' },
154
+ ],
155
+ }
156
+ ```
157
+
158
+ What the compiler emits:
159
+
160
+ - **`access: { resource: 'chats' }`** — `app.use('/realtime/chat/*', …)` that 401s anonymous, parses the URL segment as a row id, queries `chats` with the resource's `buildFirewallConditions(ctx)` and `eq(chats.id, rowId)`, and 403s when the row is invisible to the caller (out-of-org, soft-deleted, etc.). The DO's `onLoad` / `onConnect` then runs only for rows the user can already read.
161
+ - **Multi-resource form** — same gate but with a regex parser dispatching to per-kind firewall lookups. Unknown kinds 400 at the gate.
162
+ - **`access: 'public'`** — `app.use('/realtime/<kebab>/*', …)` that just passes through. Use for anonymous game lobbies / public collab pads where the room itself is the unit of access.
163
+ - **No `access` declared** — falls through to the catchall `/realtime/*` gate that just checks `ctx.authenticated`. (v0.11.1 behavior.)
164
+
165
+ Compile-time validation: every `resource` / `resources[].resource` value is checked against the project's feature names so typos surface as build errors, not as runtime 400s on the first WS upgrade.
121
166
 
122
167
  ### Hand-written mount with `onBeforeConnect`
123
168