@quickback-dev/cli 0.13.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/commands/compile.d.ts.map +1 -1
  2. package/dist/commands/compile.js +40 -2
  3. package/dist/commands/compile.js.map +1 -1
  4. package/dist/docs/content.js +13 -13
  5. package/dist/docs/content.js.map +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/lib/copy-public-assets.d.ts +34 -0
  8. package/dist/lib/copy-public-assets.d.ts.map +1 -0
  9. package/dist/lib/copy-public-assets.js +118 -0
  10. package/dist/lib/copy-public-assets.js.map +1 -0
  11. package/dist/lib/copy-public-assets.test.d.ts +2 -0
  12. package/dist/lib/copy-public-assets.test.d.ts.map +1 -0
  13. package/dist/lib/copy-public-assets.test.js +151 -0
  14. package/dist/lib/copy-public-assets.test.js.map +1 -0
  15. package/dist/skill/docs/changelog.md +350 -1
  16. package/dist/skill/docs/compiler/config/index.md +18 -0
  17. package/dist/skill/docs/compiler/config/output.md +34 -0
  18. package/dist/skill/docs/compiler/definitions/access.md +180 -4
  19. package/dist/skill/docs/compiler/definitions/actions.md +145 -0
  20. package/dist/skill/docs/compiler/definitions/firewall.md +73 -0
  21. package/dist/skill/docs/compiler/definitions/index.md +2 -0
  22. package/dist/skill/docs/compiler/definitions/masking.md +11 -0
  23. package/dist/skill/docs/compiler/definitions/read.md +8 -7
  24. package/dist/skill/docs/compiler/definitions/schema.md +9 -0
  25. package/dist/skill/docs/compiler/definitions/views.md +100 -12
  26. package/dist/skill/docs/compiler/getting-started/full-example.md +12 -11
  27. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +1 -2
  28. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/views-api.md +8 -13
  29. package/package.json +1 -1
  30. package/src/skill/docs/changelog.md +350 -1
  31. package/src/skill/docs/compiler/config/index.md +18 -0
  32. package/src/skill/docs/compiler/config/output.md +34 -0
  33. package/src/skill/docs/compiler/definitions/access.md +180 -4
  34. package/src/skill/docs/compiler/definitions/actions.md +145 -0
  35. package/src/skill/docs/compiler/definitions/firewall.md +73 -0
  36. package/src/skill/docs/compiler/definitions/index.md +2 -0
  37. package/src/skill/docs/compiler/definitions/masking.md +11 -0
  38. package/src/skill/docs/compiler/definitions/read.md +8 -7
  39. package/src/skill/docs/compiler/definitions/schema.md +9 -0
  40. package/src/skill/docs/compiler/definitions/views.md +100 -12
  41. package/src/skill/docs/compiler/getting-started/full-example.md +12 -11
  42. package/src/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +1 -2
  43. package/src/skill/docs/compiler/targets/hono-api/using-the-api/views-api.md +8 -13
@@ -4,6 +4,355 @@ Release notes for the Quickback compiler, CLI, and platform.
4
4
 
5
5
  ---
6
6
 
7
+ ## v0.15.0 — May 7, 2026
8
+
9
+ ### Sysadmin tier — cross-tenant DB-admin role for the CMS
10
+
11
+ A new opt-in `cms: { sysadmin: true }` flag turns the CMS into a Supabase-style cross-tenant DB-admin tool gated by `user.role === 'sysadmin'`. Distinct from `'admin'` so Better Auth admin-plugin powers (user management, impersonation) and DB-admin powers stay decoupled. Off by default — projects without the feature get zero behavior change.
12
+
13
+ When enabled, the compiler emits a `SYSADMIN` pseudo-role (fifth marker alongside `PUBLIC` / `AUTHENTICATED` / `USER` / `ADMIN`); a firewall escape hatch in every `buildFirewallConditions` that drops tenant scopes for `ctx.userRole === 'sysadmin'` while preserving soft-delete; a true cross-tenant `/admin/v1/sysadmin/organizations` endpoint that selects directly from the auth-schema `organization` table; and a relaxed cross-tenant guard that skips the `ORG_REQUIRED` 400 for sysadmins on list routes — that's how the SPA's "All organizations" sentinel reaches the firewall escape end-to-end.
14
+
15
+ The CMS SPA gains a two-mode design: org admins keep the existing membership-based switcher (Better Auth's `setActiveOrganization`); sysadmins get a `SysadminOrgSelector` that loads from the cross-tenant endpoint, defaults to "All organizations" (omits the org filter on reads), and pins selected tenants via `?organizationId=` on every API call (sysadmins have no member rows, so `setActive` would 403). A new `OrgGate` component handles no-active-org cases for org users — auto-pick when there's exactly one membership, full-frame picker for multiple, empty state for zero — so sessions that lost their active org don't dead-end.
16
+
17
+ Refusing to compile `roles: ["SYSADMIN"]` without `cms.sysadmin: true` keeps the role from sitting as dead code. RLS providers (Neon, Supabase) emit `false` for `SYSADMIN` today; per-table RLS policy emit is a follow-up.
18
+
19
+ ### Durable Object `[[migrations]]` order is now preserved across recompiles
20
+
21
+ Cloudflare's migration system is append-only — every deploy must include previously-deployed migration tags in their original order, with new ones appended last. CF rejects deploys with `code: 10061` when the order shifts. The compiler used to iterate `bindings.durableObjects` in config order at emit time, so a user inserting a new DO into the middle of the array bumped every later auto-migration into the wrong slot, breaking deploys for projects with multiple DOs (caught by AttendVIP).
22
+
23
+ The CLI now sends the project's existing `wrangler.toml` (when present) in `existingFiles` alongside the drizzle meta. The compiler parses migration tags from it via `parseExistingMigrationTags`, then emits auto-generated DO `[[migrations]]` blocks in two phases: deployed entries first (preserving the existing wrangler.toml order), net-new entries appended last in `bindings.durableObjects` config order. Reordering DOs in the config array no longer reshuffles deployed migrations; inserting a new DO anywhere in the array always appends its migration block last. First compiles (no existing wrangler.toml) keep the current config-order behavior — no behavior change for new projects. User-declared `bindings.durableObjectMigrations` (historical entries) are unaffected; they continue to emit first.
24
+
25
+ ### Standalone-action wrapper no longer 403s `AUTHENTICATED`-only routes on org-scoped projects
26
+
27
+ Standalone actions (`standalone: true`) on org-scoped projects emitted an unconditional `if (!ctx.activeOrgId) return 403 ACCESS_NO_ORG` gate before role checking. For an action declared `access: { roles: ["AUTHENTICATED"] }`, this contradicted the access rule itself: a signed-in user with no active org (e.g. just signed up but not yet joined an organization, or a token-auth caller) was the exact caller `AUTHENTICATED` was supposed to admit. Found by AttendVIP — every recompile re-introduced the bug because the fix lived in handler-side patches, not the generator. The standalone wrapper now skips the org gate when the access tree references any pseudo-role anywhere, including under `or:`/`and:` arms.
28
+
29
+ ### Queue handler emit no longer drops the `queue` export when there are no embeddings
30
+
31
+ `compiler.ts` emits `src/queue-consumer.ts` whenever `embeddingFeatures.length > 0 || queueHandlers.length > 0`, but the worker entry only checked `hasEmbeddings`. Projects with custom queue handlers under `services/queues/*` and no embeddings got the consumer file generated and then no entry-point wiring — wrangler bound the queue to a missing handler at deploy time. Caught against AttendVIP's `sendCancelEmail` queue handler. `MainAppOptions` and `CloudflareMainAppOptions` gain a `hasQueueHandlers` flag; `generateQueueImport` and `generateCloudflareExport` now gate on `hasEmbeddings || hasQueueHandlers`.
32
+
33
+ ### `quickback/public/` — static-asset passthrough into `src/apps/`
34
+
35
+ A new opt-in folder. Anything you drop under `quickback/public/` is copied verbatim into `src/apps/` on every compile, where the wrangler `[assets]` binding (`directory = "src/apps"`) already serves it. So `quickback/public/robots.txt` becomes reachable at `https://your-domain/robots.txt`, `quickback/public/og/og-image.png` at `/og/og-image.png`, and so on. Favicons, `robots.txt`, OG images, marketing PDFs, sitemap fragments, `.well-known/` files — anything you'd previously have had to post-process into `src/apps/` after each compile.
36
+
37
+ The compiler does **not** parse, template, or otherwise touch these files. They ride past it as bytes — the CLI does the copy after `writeFilesWithMerge`, using `fs.copyFile` so binaries (PNGs, fonts, PDFs) stay byte-perfect rather than being corrupted by the utf-8 string channel the compiler manifest uses for source files. The compiler API contract is unchanged; nothing round-trips through `compile.quickback.dev`.
38
+
39
+ Rules:
40
+
41
+ - **Optional.** If the folder doesn't exist, the step is a no-op.
42
+ - **Stale-cleaned.** `src/` is wiped and rewritten each compile, so files removed from `quickback/public/` disappear from `src/apps/` automatically on the next run.
43
+ - **Hidden entries skipped.** `.DS_Store`, `.git/`, dotfiles — none of these were intentional drops; including them would break worker asset bindings.
44
+ - **Collisions fail loud.** A file in `quickback/public/` whose path would shadow a compiler-emitted manifest entry — e.g. `quickback/public/cms/index.html` against the SPA shell — fails the compile with the offending paths listed, rather than silently overwriting and producing a confused-looking SPA build. Move or rename the offending file.
45
+
46
+ The change is contained to the CLI: `packages/cli/src/lib/copy-public-assets.ts` (helper + `PublicAssetCollisionError`) and one block in `packages/cli/src/commands/compile.ts`. Test coverage in `copy-public-assets.test.ts` walks the missing-folder, single-file, nested-tree, binary-preservation, hidden-entry, single-collision, multi-collision, empty-folder, and split-output cases — nine tests, byte-level assertions on the binary path.
47
+
48
+ ---
49
+
50
+ ## v0.14.7 — May 7, 2026
51
+
52
+ ### Four more codegen bugs caught by AttendVIP — generated output now typechecks for projects with non-`id` PKs and DO-only features
53
+
54
+ Filed after AttendVIP's `tsc` reported 230 errors against the generated `src/`. Triage split them into six patterns; four are surgical and ship here. The other two (TS2769 ×156 + TS2339 ×~50) trace to a deeper assumption — every queryable table has a string-typed `id` column — and are deferred to v0.14.8 along with the agreed `id` auto-inject design (see *Coming next* below).
55
+
56
+ **1. Duplicate `guests` import in routes that use relationship-roles (`TS2300`).** The relationship-import injector (`generators/feature-generator.ts`) added `import { <table>, buildFirewallConditions as build<Table>FirewallConditions } from './<table>.resource'` whenever it detected a relationship-table reference in the routes file — without checking that the table binding was already imported from `./schema` upstream. So `guests.routes.ts` ended up with `guests` declared twice. Fix: scan the existing import block, only add identifiers that aren't already in scope (drop the binding from the new import line, or skip the line entirely if both binding and alias are imported).
57
+
58
+ **2. `db` referenced before declaration in single-record + bulk action handlers (`TS2448` / `TS2304`).** `record-based.ts:195,541` baked `firewallClause = ...buildFirewallConditions(ctx, db)...` and used the same string in two places: (a) the outer pre-fetch `await unsafeDb.select().from(table).where(firewallClause)` — where `db` doesn't exist yet (`db = createScopedDb(unsafeDb, ctx)` is declared later for handler scope), and (b) inside `processBatch` where `db` is created from the tx/handle param. The outer use threw at typecheck (`'db' is used before its declaration`); at runtime it would have been a `ReferenceError`. Fix: pass `unsafeDb` (the in-scope handle) to `buildFirewallConditions` in both `firewallClause` definitions. The helper only uses its `db` arg for relationship-role subqueries (when `via:` is in play); either handle is a valid Drizzle client for that lookup.
59
+
60
+ **3. PartyServer realtime gates passed 1 arg to a 2-arg `buildFirewall_X` (`TS2554`).** `optional-routes.ts` emitted `buildFirewall_<feature>(ctx as any)` in the WebSocket-upgrade gate for every Durable Object that declared `access: { resource }`. After v0.14.4 made `buildFirewallConditions(ctx, db)` 2-arg whenever the resource has any `via:` predicate, this gate stopped compiling for any DO whose target feature uses relationship-roles. AttendVIP's `event-pages` DO sits on `event_pages` (admin via `guestOf`), which is exactly that case. Fix: the gate already constructs `db = drizzle(c.env.<binding>)` for its own `db.select(...).limit(1)` — pass that same `db` into the firewall call. Mirrored in both the single-resource and multi-resource gate branches.
61
+
62
+ **4. Durable-object-only features dropped their `lib/` files from output (`TS2307`).** `compiler.ts:546` only ran the feature-walker (and copied `featureLibFiles` to output) when the feature had at least one action file. AttendVIP's `user-profiles/` declares a single DO source under `lib/UserGateway.ts` and zero `actions/` — perfectly valid (per-user realtime gateway, the Slack/Linear pattern), but the walker skipped the feature entirely. The compile finished without error, then `index.ts` tried to import `./features/user-profiles/lib/UserGateway` and `tsc` 404'd the module. `event-pages/PageRoom.ts` worked only because that feature happens to also have `actions/`. Fix: run the discovery + lib-copy path whenever the feature has either actions OR lib files. Copying `lib/` files when the feature has at least one of either is the safe reading of the original intent.
63
+
64
+ **Drops ~20 of the 230 attendvip errors** (TS2300 ×2, TS2448 ×11, TS2304 ×6, TS2554 ×2 from the realtime gate, TS2307 ×1 — depending on cache state). The remaining 210 are TS2769 (numeric-ID arrays where the column is `integer`, not `text`) and TS2339 (`.id` referenced on tables that have a non-`id` PK or a compound PK) — both downstream of the same root: `id` is currently *not* auto-injected, only audit columns are.
65
+
66
+ ### Account auth: emailOtp on AWS SES drops the magic-link companion (OTP-only)
67
+
68
+ The compiler used to auto-wire `createComboAuthSendVerificationOTP` from `@quickback-dev/better-auth-combo-auth` whenever a project used `emailOtp` with the `aws-ses` email provider — sign-in / sign-up / verify emails carried *both* a 6-digit OTP and a clickable magic link, with `useComboAuthEmail: true` in the SES config. This was on by default for every account-app project that picked AWS SES.
69
+
70
+ Two reasons to drop the magic-link half:
71
+
72
+ 1. **Mail-client URL prefetching can burn the OTP before the human sees the email.** Outlook Safe Links, Gmail mobile, corporate proxies, and security scanners all eagerly fetch URLs in incoming mail; the magic link's `?data=...` payload includes the OTP server-side, so the first GET completes the sign-in (consuming the one-time code) and the user clicking through 30 seconds later gets a "code already used" failure.
73
+ 2. **Two sign-in surfaces are harder to support.** The account SPA's `/welcome` and `/email-otp` routes only render the OTP form; the magic-link arm bypasses that UI entirely. One canonical entry point (enter the code) keeps the account flow legible.
74
+
75
+ The compiler now emits a plain `sendVerificationOTP` callback that calls `sendEmailWithSES` with `emailTemplates.emailOTP` directly — no combo wrapper, no magic-link URL. `useComboAuthEmail` is hardcoded to `false`. The `@quickback-dev/better-auth-combo-auth` package and the `magicLink` plugin are still available for users who explicitly opt in via a custom `sendVerificationOTP` in their config; the change here is just the auto-wired default.
76
+
77
+ Test coverage: `auth-email-wiring.test.ts` was updated to assert the new shape — generated auth files for `emailOtp + aws-ses` now contain `emailTemplates.emailOTP` and `useComboAuthEmail: false`, and explicitly do not contain `createComboAuthSendVerificationOTP` or `better-auth-combo-auth`.
78
+
79
+ ### Coming next — `id` field auto-injection (v0.14.8)
80
+
81
+ The compiler treats `id` as load-bearing across CRUD/action route generators, FK probing, access checks, OpenAPI emission, and CMS — but doesn't add it for you the way it adds `createdAt`/`modifiedAt`/`createdBy`/`modifiedBy` (or `organizationId` in org-scoped features, or `deletedAt`/`deletedBy` for soft-delete tables). Tables that omit `id` (or use a non-`id` single PK like `userId.primaryKey()`, or a compound `primaryKey({ columns: [...] })` constraint) are accepted at parse time but produce broken output downstream. AttendVIP's `user_profiles`, `user_presence`, `user_notification_prefs`, `chat_reads`, and `chat_channel_members` all hit this.
82
+
83
+ **Agreed direction:** mirror `injectAuditFields` with a new `injectIdField` that runs unconditionally — including on junction tables. Tables with no PK or a non-`id` PK get an `id` column auto-injected; existing column-level `.primaryKey()` on a non-`id` column gets demoted to `.notNull()`; `primaryKey({ columns: [...] })` constraints get rewritten to `uniqueIndex().on(...)`. The cost (one extra column per junction row) is minimal and closes the asymmetry — every table participating in routes gets a single string-typed `id`, just like every table gets `createdAt`. Migration tail (existing D1 databases need an ADD COLUMN + index rewrite per affected table) is generated alongside.
84
+
85
+ No user code changes required for the four fixes shipping in v0.14.7. Recompile and the affected features typecheck.
86
+
87
+ ---
88
+
89
+ ## v0.14.6 — May 7, 2026
90
+
91
+ ### Four more v0.14 compiler bugs caught by AttendVIP's MCP rollout
92
+
93
+ Filed in `research/attendvip-v014-mcp-and-firewall-gaps.md` after AttendVIP patched these locally and asked us to upstream them. All four ride a single MCP `tools/call` against a team-scoped resource over a Bearer api-key — fix any one and the next bug surfaces. We're shipping them as one patch release with end-to-end coverage of the chain.
94
+
95
+ **1. MCP `tools/call` URL is double-prefixed for action tools.** The OpenAPI spec emits action paths as `/api/v1/<action>` already-absolute, but the MCP request builder did `'/api/v1' + tool._path` unconditionally — so action tool calls hit `/api/v1/api/v1/<action>` and 404'd. CRUD tools (bare `_path: '/customers'`) were unaffected. Fix: prefix only when `_path` doesn't already start with `/api/v1/`.
96
+
97
+ **2. Auth middleware ignored `Authorization: Bearer <api-key>`.** MCP clients (claude.ai, etc.) only set `Authorization: Bearer ...`. The api-key block read from `x-api-key` header / `?api_key=` / `?key=` query but not from `Authorization`; the JWT fast-path narrowly gated on `bearerToken.startsWith('eyJ')`. Non-JWT bearers fell through to BA session auth, which doesn't recognise api-keys, so the request authenticated as anonymous and `tools/list` returned only PUBLIC tools. Fix: api-key extraction now also accepts a non-JWT `Authorization: Bearer <token>` as the key candidate. Three transports for one credential — header / query / Bearer.
98
+
99
+ **3. `auth.roleHierarchy` was silently inert for runtime role checks.** A user configured `auth.roleHierarchy: ['owner', 'admin', 'member']` and expected an `owner` to satisfy any check requiring `admin` or `member`. But the api-key + JWT fast-paths populated `ctx.roles` with the single org-member role, and the access checker did strict intersection — owner ∩ {admin, member} = ∅ → 403. Fix: at the api-key, JWT fast-path, AND BA session paths, expand the user's role via `auth.roleHierarchy` so a higher role inherits all lower-role privileges. The hierarchy is auto-normalized — users who write the array reversed (`['owner', 'admin', 'member']` instead of the documented `['member', 'admin', 'owner']`) now get the same correct expansion.
100
+
101
+ **4. Team-firewall predicate hardcoded `eq(table.teamId, ctx.activeTeamId!)` even when no team was active.** The `!` non-null assertion lied at runtime — api-keys, JWTs, and sessions without an active team carry `undefined`. The resulting SQL was `team_id = NULL` which matches nothing, so api-key callers saw zero rows on team-scoped resources. Fix: emit the team predicate as `(ctx.activeTeamId ? eq(...) : undefined)` — drizzle's `and(...)` drops `undefined`, so the WHERE collapses to the org scope only. Org and owner predicates are deliberately NOT softened the same way (those are security boundaries, not optional scopes).
102
+
103
+ After upstreaming, the AttendVIP one-shot verification passes:
104
+
105
+ ```bash
106
+ curl -fs -X POST https://attend.vip/mcp \
107
+ -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
108
+ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"listEvents","arguments":{}}}' \
109
+ | jq '.result.content[0].text | fromjson | .data | length' # > 0
110
+ ```
111
+
112
+ No user code changes required for any of the four. Recompile and the MCP path works end-to-end against team-scoped, role-gated resources via Bearer api-key.
113
+
114
+ ---
115
+
116
+ ## v0.14.5 — May 7, 2026
117
+
118
+ ### MCP `tools/call` no longer crashes with `undefined (reading 'AUTH_DB')`
119
+
120
+ The generated MCP server's `tools/call` dispatch re-enters the same Hono app via `app.request(internalReq)` so every tool invocation runs through the full middleware chain (auth, firewall, access, guards, masking). But the call passed only the request — not `env` or `executionCtx` — so the sub-request handler ran with `c.env === undefined`. Any tool whose route touched a Cloudflare binding (e.g. the `AUTH_DB` D1, KV, R2, Queues) crashed with `Cannot read properties of undefined (reading 'AUTH_DB')`. Found by AttendVIP — every action that hit auth-side data (acceptInvite, etc.) failed.
121
+
122
+ **Fix:** `mountMcp` now threads `c.env` and `c.executionCtx` through to `handle → handleRpc → callTool → app.request(internalReq, undefined, env, executionCtx)`. Hono's `request()` 3rd/4th args set the bindings + execution context for the sub-request, so the action handler sees the same env the outer worker received. Tools/list was unaffected — it reads ctx in-process and never re-enters the app.
123
+
124
+ No user code changes required. Recompile against v0.14.5 and the MCP endpoint dispatches actions correctly against all bindings.
125
+
126
+ ---
127
+
128
+ ## v0.14.4 — May 7, 2026
129
+
130
+ ### `via:` firewall predicates no longer crash with `ReferenceError: db is not defined`
131
+
132
+ The relationship-role generator (v0.14.0) emits a `buildFirewallConditions` body that references `db`, `inArray`, and `sql` at function scope when any predicate has `via:` — but the resource-file imports it generated only pulled in `eq, and, isNull, type SQL`. So every endpoint guarded by `firewall: [{ field, via }]` threw `ReferenceError: db is not defined` at the very first request, and the catch-all returned 500 before the firewall query ever ran. Found by AttendVIP on `/api/v1/event-pages` against v0.14.3 — none of the v0.14.0 → v0.14.3 unit tests exercised emitted-import resolution, so the bug rode through three patch releases.
133
+
134
+ Two fixes:
135
+
136
+ 1. **Imports in the generated resource file now include `inArray, sql`** when the firewall has any `via:` predicate. Hidden behind a flag so a no-via resource still gets the minimal import surface.
137
+ 2. **`buildFirewallConditions` now takes `(ctx, db)`** and the wrapper template (`WITH_FIREWALL_HELPER`) pulls `const db = c.get('db' as never) as any;` from the Hono context before invoking it. Every CRUD/action call site (single-record + batch + record-based-action) was updated to pass `db` through.
138
+
139
+ Regression test added (`firewall-via-imports.test.ts`) that parses the generated resource file's top-level imports and asserts every free identifier referenced in `buildFirewallConditions` resolves to either an import or a function parameter — so a future generator change that introduces a new free identifier (`exists`, `not`, etc.) without importing it fails the unit suite instead of leaking to a real project.
140
+
141
+ No user code changes required — recompile and `via:` predicates work end-to-end.
142
+
143
+ ---
144
+
145
+ ## v0.14.3 — May 7, 2026
146
+
147
+ ### Relationship-role consumers now resolve the relationship-table binding at runtime
148
+
149
+ Pre-fix, the v0.14.0 relationship-role generator emitted imports like `import { eventGuests, buildFirewallConditions as buildEventGuestsFirewallConditions } from '../event-guests/event-guests.resource'` on every consuming resource — but the relationship-table's own `.resource.ts` file imported `event_guests` from `./schema` for its own use without re-exporting it. So the consuming file got `undefined` at runtime, every relationship subquery failed with `Cannot read properties of undefined`, and the whole authz layer was unreachable on real projects.
150
+
151
+ Found by AttendVIP within minutes of recompiling against v0.14.2: the moment they hit any endpoint guarded by `firewall: [{ field, via }]` or `crud.<op>.access roles: ['guest']`, the request errored before the firewall query ran.
152
+
153
+ The fix is one line in `generateTableResourceHelpers` — re-export the Drizzle table binding from the `.resource` file alongside the existing import. The `.resource` file is the public surface of the table; the schema is an implementation detail. This decision was implicit in the relationship-import resolver's path choice but not enforced on the producer side.
154
+
155
+ ```ts
156
+ // generated <table>.resource.ts (after fix)
157
+ import { event_guests } from './schema';
158
+ export { event_guests }; // ← was missing
159
+ ```
160
+
161
+ Regression test added (`authz-end-to-end.test.ts`) that asserts every `.resource` file re-exports its Drizzle binding, so this can't drift again. No user code changes required — recompile and the cross-feature relationship subqueries resolve correctly.
162
+
163
+ ---
164
+
165
+ ## v0.14.2 — May 7, 2026
166
+
167
+ ### Wrangler `[[migrations]]` no longer drops historical Durable Object lifecycle entries
168
+
169
+ Cloudflare requires the `[[migrations]]` list in `wrangler.toml` to be **append-only**: once a tag has been deployed, removing it on a subsequent compile causes the next deploy to fail with `Cannot apply <new|deleted|renamed|transferred>-class migration to class <X>` — CF replays the full migrations log on every push and notices the tag is gone.
170
+
171
+ Pre-fix, the compiler regenerated the `[[migrations]]` blocks from scratch on every compile, emitting only entries for the *current* `durableObjects` bindings. Any historical lifecycle events the user had hand-maintained — `deleted_classes`, `renamed_classes`, `transferred_classes` — were silently dropped and the deploy then broke. AttendVIP hit this first: a `qb-do-deleted-legacy-notes-2026-05-05` deletion entry got dropped, and the next deploy tried to re-apply `qb-do-Notepad`'s `new_sqlite_classes` against the existing class.
172
+
173
+ The fix adds a new config slot — `bindings.durableObjectMigrations` — for historical entries that survive recompiles. Declared entries are emitted FIRST in the generated `wrangler.toml`'s migrations list (preserving chronological order), then the auto-generated current-class creation entries follow, deduplicated by tag so an explicit user entry wins over the auto-emit.
174
+
175
+ ```ts
176
+ // quickback.config.ts
177
+ bindings: {
178
+ durableObjects: [
179
+ { name: 'NOTEPAD', className: 'Notepad', from: 'lib/Notepad' },
180
+ ],
181
+ durableObjectMigrations: [
182
+ // Carry forward across recompiles — Cloudflare's migration list is append-only.
183
+ {
184
+ tag: 'qb-do-deleted-legacy-notes-2026-05-05',
185
+ deletedClasses: ['LegacyNotes'],
186
+ },
187
+ ],
188
+ }
189
+ ```
190
+
191
+ All four lifecycle shapes are supported: `newClasses` / `newSqliteClasses` (creations), `deletedClasses` (removals), `renamedClasses` (`{ from, to }` inline-table-array), `transferredClasses` (`{ from, from_script, to }` for moves between workers). The user-declared entry can also override the auto-emit by reusing the same tag — useful when a DO started life as KV-backed before SQLite-DOs existed.
192
+
193
+ This is a config-side fix, not a wrangler.toml-merging one — Quickback doesn't read your existing `wrangler.toml`. The discipline is the same as for any append-only log: declare lifecycle events as you make them. Auto-detection of removed classes from the schema diff is on the roadmap; for now the compiler trusts your declaration.
194
+
195
+ 7 new tests covering deletion, rename, transfer, multi-entry ordering, override-via-same-tag, no-history bit-identical output, and the historical-only-no-current-DOs edge case.
196
+
197
+ ---
198
+
199
+ ## v0.14.1 — May 7, 2026
200
+
201
+ ### Bulk action variants now appear in `openapi.json`
202
+
203
+ Record-based actions with `bulkVariant: true` (introduced in v0.14.0) generate a working `POST /<base>/batch/<actionName>` route at runtime, but the OpenAPI generator wasn't aware of them — so the bulk endpoints were invisible to typed-client codegen (`api-types.gen.ts`) and to MCP-driven agents discovering operations from the spec. AttendVIP's v0.14.0 rollout (seven actions with `bulkVariant: true`: `approve`, `checkIn`, `checkOut`, `setVisibility`, `cancelInvite`, `sendInvite`, `sessionApprove`) found this within hours of shipping.
204
+
205
+ The OpenAPI generator now emits each bulk variant as a sibling operation to its per-record action, with the documented request shape (`{ ids: string[], input, failFast? }`), correct 200 / 207 / 400 responses, an `x-bulk-variant: true` marker, and a separate `<resource><Action>Bulk` `operationId` so client codegen can distinguish single from bulk. The fix also threads `bulkVariant` through `getAllActions` so any other downstream consumer of the action registry sees the flag — previously the parser captured it but the spec-emit path silently dropped it.
206
+
207
+ No changes required in user code. Re-running `quickback compile` regenerates `openapi.json` with both routes per `bulkVariant: true` action; downstream `api-types.gen.ts` builds pick up the new operations on the next codegen run.
208
+
209
+ ### Cross-tenant "my events" pattern documented with a worked example
210
+
211
+ The v0.14.0 docs noted that relationship-roles do **not** solve cross-tenant aggregation ("a guest's view of events across all tenants they were invited to") and pointed at function-form access as the workaround, but didn't show what that looked like in practice. The access docs now carry a full standalone-action example for `GET /my-events` — the canonical attendee-dashboard pattern — including the two security guardrails (always filter by `ctx.userId`; the action takes responsibility for soft-delete and other invariants the firewall would otherwise apply). Standalone actions are already mandatorily audit-logged in the runtime, so the cross-tenant traversal is recorded automatically.
212
+
213
+ See [Access → Cross-tenant "my events" dashboards](/compiler/definitions/access#cross-tenant-my-events-dashboards-are-not-this).
214
+
215
+ ---
216
+
217
+ ## v0.14.0 — May 7, 2026
218
+
219
+ ### Relationship-based authorization roles
220
+
221
+ Quickback's role system now supports a third kind of role beyond Better Auth org membership and the four pseudo-roles (`PUBLIC`/`AUTHENTICATED`/`USER`/`ADMIN`): **relationship-roles** that bind to a domain-table membership ("user is a confirmed guest of this event") rather than an org/admin gate. The original ask was a B2B event-management app where logged-in users who aren't team members but ARE confirmed guests of an event need to see that event's sessions, pages, and tracks — same data, different access lane. The old workarounds (function-form access, hand-written actions, `firewall: { exception: true }`) all gave up some combination of OpenAPI/MCP visibility, CRUD code generation, or tenant safety.
222
+
223
+ Declare the relationship once in `quickback.config.ts`, then reference it from `firewall:` or `access.roles:`:
224
+
225
+ ```ts
226
+ // quickback.config.ts
227
+ authz: {
228
+ relationships: {
229
+ guestOf: {
230
+ from: 'event_guests', // relationship table
231
+ subject: { column: 'userId', equals: 'ctx.userId' }, // caller side
232
+ resource: { column: 'eventId' }, // resource side
233
+ where: { status: 'confirmed' }, // optional row filter
234
+ },
235
+ },
236
+ roles: {
237
+ guest: { via: 'guestOf' },
238
+ eventStaff: {
239
+ or: [{ via: 'guestOf' }, { roles: ['admin', 'owner'] }],
240
+ },
241
+ },
242
+ }
243
+
244
+ // features/sessions/sessions.ts
245
+ firewall: [
246
+ { field: 'organizationId', equals: 'ctx.activeOrgId' },
247
+ { field: 'eventId', via: 'guestOf' }, // ← row scoping
248
+ ],
249
+ read: { access: { roles: ['admin', 'member', 'guest'] } }, // ← OR-composed
250
+ crud: {
251
+ create: { access: { roles: ['admin', 'guest'] } }, // inline async lookup
252
+ update: { access: { roles: ['admin'] } },
253
+ }
254
+ ```
255
+
256
+ The compiler emits an inline Drizzle subquery against the relationship table and AND-composes it as the outermost firewall clause. The relationship table's own `buildFirewallConditions(ctx)` is called inside the subquery so soft-delete and tenant scope on the relationship row are always honored — soft-deleting an `event_guests` row revokes access immediately. Anonymous callers fail closed (the subquery short-circuits to `WHERE 1 = 0` when `ctx.userId` is null). Cross-tenant grants are impossible because the resource's tenant filter sits as the outermost AND, never folded into a role OR. See [Firewall → Relationship-based scoping](/compiler/definitions/firewall#relationship-based-scoping-via) and [Access → Relationship-based authorization](/compiler/definitions/access#relationship-based-authorization).
257
+
258
+ What works in v0.14.0:
259
+
260
+ | Surface | Status |
261
+ |---|---|
262
+ | `firewall: [{ field, via }]` row-level scoping | Full |
263
+ | `crud.<op>.access` `roles: ['guest']` (inline emission) | Full |
264
+ | `read.access` and `read.views.*.access` | Full |
265
+ | `masking.<f>.show` `roles: ['guest']` | Compile-refused (workaround pointer) |
266
+ | `actions.<n>.access` `roles: ['guest']` | Compile-refused (workaround pointer) |
267
+
268
+ The runtime evaluator fails closed on relationship arms regardless of which surface you hit, so silent grants are impossible everywhere. The two refused surfaces have clear compile-time errors pointing to the working pattern (gate the row at the firewall layer with `via:`, gate the role at the access layer with BA roles).
269
+
270
+ Compile-time refusals also catch: unknown `via:` reference, cycles in role composition (`a → b → a`), reserved role-name shadowing (auth-provider-derived only — `guest`/`speaker`/`attendee` are free; `admin`/`owner`/`member` are reserved when the BA org plugin is on), unknown relationship `from` table, resource missing the `resource.column`, relationship table with `firewall: { exception: true }` (would let cross-tenant grants slip through), `lowering: 'session'` (reserved for v2 — staleness/invalidation ergonomics not yet shipped), and `+` hierarchy on relationship-roles (terminal, like pseudo-roles).
271
+
272
+ Cross-tenant "my events" dashboards (a logged-in user wants `GET /my-events` returning events they're a guest of *across all tenants*) are **not** solved by relationship-roles — the tenant firewall stays the outermost AND. For that pattern, use a user-scoped firewall (`firewall: { owner: { column: 'userId' } }`) or function-form access on a dedicated route. Documented prominently in [access.mdx](/compiler/definitions/access#cross-tenant-my-events-dashboards-are-not-this) so users don't reach for relationship-roles first and get confused.
273
+
274
+ Roadmap: `lowering: 'session'` ergonomics, inline relationship emission for `actions.access` (needs `relationshipBindings` design), async/batched mask functions for `masking.show`. The schema slots are reserved so v2 lands non-breaking.
275
+
276
+ ### Bulk variants of record-based actions
277
+
278
+ Record-based actions can now opt into an auto-generated bulk route alongside the per-record route. Set `bulkVariant: true` on a `defineAction({...})` and the compiler emits `POST /:resource/batch/{action}` that loops the same access + transition + execute pipeline over a `{ ids: [...], input, failFast? }` body. The original ask was an event-management UX where every domain bulk operation (approve N guests, rescind N invites, advance N applications) became a hand-written standalone action that re-implemented a per-record action's transition + execute logic in a `for` loop — `PATCH /:resource/batch` couldn't do it because state lives on a protected field, which is the right call for safety.
279
+
280
+ ```ts
281
+ // features/applications/actions/advance.ts
282
+ export default defineAction({
283
+ description: "Move an application forward in the pipeline.",
284
+ input: z.object({ nextStatus: z.enum(["screening", "interview", "offer"]) }),
285
+ access: { roles: ["owner", "admin"] },
286
+ bulkVariant: true, // ← opt-in
287
+ transition: { field: "status", via: "nextStatus", fromTo: { /* ... */ } },
288
+ async execute({ db, record, input, whereTransition }) {
289
+ // exact same body as before — runs once per id
290
+ },
291
+ });
292
+ ```
293
+
294
+ Per-record outcomes return as 207 Multi-Status with the same `{ success, errors, meta }` shape as `PATCH /batch`. Each id flows through the firewall fetch, the per-record `evaluateAccessReason` split (403 role / 409 record-precondition), the transition pre-check, and the same `whereTransition` factory the single-record route uses — so a stale-state record fails for that id alone, not the whole batch. `failFast: true` aborts on the first failure and (on Postgres / Supabase / Neon / libsql / sqlite drivers) wraps the loop in `db.transaction()` so prior writes roll back; D1 is documented as fail-fast-without-rollback because it has no `db.transaction`.
295
+
296
+ Compile-time refusals: `bulkVariant: true` is rejected on standalone actions (no record context to loop over) and on actions that declare `unsafe` (cross-tenant per-record audit not yet wired). Method is forced to POST regardless of the action's `method` setting — the one-row-to-many-rows asymmetry makes inheriting GET/DELETE confusing. Max batch size is 100 ids per request, mirroring the CRUD batch endpoints. See [Actions → Bulk variant](/compiler/definitions/actions#bulk-variant).
297
+
298
+ ### Aggregations on read views
299
+
300
+ Read views can now declare pre-computed metrics that surface on the response next to the row payload, without a custom standalone action. Every dashboard tile that previously turned into a standalone action just for "count of X grouped by Y" now lives in the same view config that drives the rows.
301
+
302
+ ```ts
303
+ read: {
304
+ views: {
305
+ pipeline: {
306
+ fields: ["id", "jobId", "candidateId", "status", "appliedAt"],
307
+ aggregations: {
308
+ totalApplications: { fn: "count" },
309
+ byStatus: { fn: "groupBy", field: "status" },
310
+ },
311
+ },
312
+ },
313
+ }
314
+ ```
315
+
316
+ Response carries `aggregations: { ... }` alongside `data`:
317
+
318
+ ```json
319
+ {
320
+ "data": [/* paginated rows */],
321
+ "view": "pipeline",
322
+ "pagination": { "count": 50, "page": 1, "pageSize": 50, "hasMore": true },
323
+ "aggregations": {
324
+ "totalApplications": 173,
325
+ "byStatus": { "applied": 102, "screening": 41, "interview": 18, "offer": 7, "rejected": 5 }
326
+ }
327
+ }
328
+ ```
329
+
330
+ Aggregations always run over the **same firewalled, filtered set** as the row query — pagination is intentionally ignored, so `?status=applied&limit=10` returns the 10 paged rows AND the count over every applied row. Supported `fn`s: `sum`, `avg`, `min`, `max`, `count` (with or without `field` — `COUNT(*)` vs `COUNT(field)`), `count_distinct`, and `groupBy` (returns `{ value: count }`, NULLs bucket as `"(none)"`).
331
+
332
+ Compile-time validation: `field` must reference a real column; `sum`/`avg` require numeric column types; the same masking opt-out gate that governs `query.{filterable, sortable, searchable}` applies to aggregations (a `sum(salary)` leaks structure even when the row payload is redacted); aggregation names cannot collide with the reserved response fields `data`, `pagination`, `view`. No raw SQL `expr:` form in v1 — column references only. See [Views → Aggregations](/compiler/definitions/views#aggregations).
333
+
334
+ ---
335
+
336
+ ## v0.13.5 — May 6, 2026
337
+
338
+ ### Object-form `auth.plugins` no longer crashes the compiler
339
+
340
+ The documented object form for per-plugin config — `plugins: { oauthProvider: {...} }`, `plugins: { organization: { teams: { enabled: true } } }`, etc. (see [Better Auth Plugins → Custom configuration](/stack/auth/plugins#oauth-provider-mcp-ready)) — was rejected by the compiler with `plugins.includes is not a function`. `hasCliAuthRoutes` called `.includes()` directly on `auth.config.plugins` to detect `deviceAuthorization`, and `generateAuthFiles` flattened plugins to a string array before handing them to the better-auth generator, silently dropping every per-plugin user option on the way through.
341
+
342
+ Both paths now run through a shared resolver that preserves the user's input format (object in → object out, array in → array out) and only adds the compiler's auto-included plugins (`organization`, `admin`, `apiKey`, plus `bearer` when `deviceAuthorization` is present) as `true` entries that don't clobber user config. Per-plugin options like `oauthProvider: { scopes: [...] }`, `organization: { teams: { enabled: true } }`, and `deviceAuthorization: { verificationUri: '...' }` now reach the generated `auth.ts` as written.
343
+
344
+ Better Auth's `ac` / `roles` access-control objects (the result of `createAccessControl(...)`) still require a custom `auth.ts` override — they're live runtime values that can't survive the JSON config trip from CLI → compiler. A declarative escape hatch for that is on the roadmap.
345
+
346
+ ### `roles: ["PUBLIC"]` is allowed on writes and actions again
347
+
348
+ v0.10.17 added a compile-time block that rejected `roles: ["PUBLIC"]` on `crud.create` / `crud.update` / `crud.delete` and on every action. The intent — "anonymous mutations are usually a misconfiguration" — collided with the legitimate use cases the rest of Quickback was built around: Gmail one-click RSVP confirms, public RSVP forms, magic-link redemption, List-Unsubscribe-Post handlers, webhook ingest, captcha-gated contact forms. None of those carry a session, so `AUTHENTICATED` 401s the caller before the handler can validate its own token, and the suggested escape hatch ("custom action that does its own auth + `firewall: { exception: true }`") was itself blocked by the same validator.
349
+
350
+ The block is removed. `PUBLIC` is the explicit, uppercase opt-in for unauthenticated access on every access node — reads, CRUD writes, views, and actions. The compiler trusts the marker; row-level safety comes from firewall, masking, and the action's own token validation. `PUBLIC` actions continue to receive **mandatory audit logging** (IP, input, result, timing) in the runtime regardless. `crud.create`/`update`/`delete` typically pair `roles: ["PUBLIC"]` with `firewall: { exception: true }` on the resource so the row predicate doesn't reject every unauthenticated caller.
351
+
352
+ `USER` and `ADMIN` keep their compile-time prerequisites (firewall must scope by `userId` / admin plugin must be enabled).
353
+
354
+ ---
355
+
7
356
  ## v0.12.0 — May 5, 2026
8
357
 
9
358
  ### Per-room authorization for PartyServer rooms
@@ -682,7 +1031,7 @@ for the full reference and migration table.
682
1031
  - `crud.list` → [`read.access`](/compiler/definitions/read) (plus `read.pageSize` / `read.maxPageSize`)
683
1032
  - `crud.get` → `read.access` (single-record GET inherits automatically; use record-level conditions on `read.access` for differentiated single-record gates)
684
1033
  - Top-level `views: {...}` → [`read.views: {...}`](/compiler/definitions/read#views-under-read-views)
685
- - `crud.list.fields` / `crud.get.fields` → declare a named view under `read.views` and call `?view={name}` (or `/views/{name}`)
1034
+ - `crud.list.fields` / `crud.get.fields` → declare a named view under `read.views` and call `/views/{name}`
686
1035
 
687
1036
  **Pre-record access ordering on `/:id`**: handlers now run a role-only
688
1037
  access check **before** the firewall query, so a caller without a matching
@@ -225,12 +225,30 @@ cms: { domain: "cms.example.com" },
225
225
 
226
226
  // With access control (only admins can access CMS)
227
227
  cms: { domain: "cms.example.com", access: "admin" },
228
+
229
+ // Cross-tenant DB-admin tier — sysadmins see every tenant's data
230
+ cms: { domain: "cms.example.com", sysadmin: true },
228
231
  ```
229
232
 
230
233
  | Option | Type | Default | Description |
231
234
  |--------|------|---------|-------------|
232
235
  | `domain` | `string` | — | Custom domain for CMS. Adds a `custom_domain` route to `wrangler.toml`. |
233
236
  | `access` | `"user" \| "admin"` | `"user"` | Controls who can access the CMS. When `"admin"`, only users with `user.role === "admin"` can enter — enforced at the Worker level (SPA shell, `/api/v1/schema`, and `custom_view` CRUD all return 403 to non-admins) and in the SPA. Also hides the CMS link in Account UI. See [CMS Connecting](/stack/cms/connecting) for the full enforcement model. |
237
+ | `sysadmin` | `boolean` | `false` | Cross-tenant DB-admin tier. When `true`, opts into the `SYSADMIN` pseudo-role (`user.role === "sysadmin"`), the firewall escape hatch (sysadmins bypass tenant scopes, soft-delete still enforced), the cross-tenant `/admin/v1/sysadmin/organizations` endpoint, and the SPA's "All organizations" sentinel. The CMS HTML gate admits `userRole === "sysadmin"` alongside `"admin"` — sysadmin is a strict superset. Off by default. See [`SYSADMIN` pseudo-role](/compiler/definitions/access#sysadmin--cross-tenant-db-admin-tier). |
238
+
239
+ ### Sysadmin tier (`cms.sysadmin: true`)
240
+
241
+ Quickback's default model assumes every CMS user belongs to at least one organization (`member` row in the auth DB). For platforms that need a Supabase-style cross-tenant DB-admin tool — debugging a tenant's data, running cross-tenant queries, supporting a customer — that's a poor fit: a sysadmin without `member` rows would dead-end, and auto-filling their active org from "first membership" silently scopes them to a tenant they have no relationship with.
242
+
243
+ `cms: { sysadmin: true }` introduces a separate role tier:
244
+
245
+ - **Role**: `user.role === "sysadmin"` (set on the Better Auth user table). Distinct from `"admin"` — admins keep org-scoped CMS access via the membership switcher; sysadmins get cross-tenant.
246
+ - **Firewall**: every `buildFirewallConditions()` emits an `if (ctx.userRole === "sysadmin") return undefined` (or just the soft-delete predicate when present) at the top, so sysadmins see every tenant's rows. See [Firewall escape hatch](/compiler/definitions/firewall#sysadmin-escape-hatch).
247
+ - **Org listing**: a new `GET /admin/v1/sysadmin/organizations` endpoint selects directly from the auth-schema `organization` table — every row, every tenant. The existing `/admin/v1/organizations` (membership-bound, used by org admins) is unchanged.
248
+ - **CMS SPA**: when the user is a sysadmin, the header switcher loads from the cross-tenant endpoint, defaults to "All organizations" (which omits `?organizationId=` and reaches the firewall escape), and pins selected tenants via `?organizationId=` on every API call. Org admins keep the existing membership-based switcher.
249
+ - **CMS HTML gate**: admits `userRole === "sysadmin"` alongside `"admin"`. Org admins are not locked out — both roles can enter the CMS in `cms.access: "admin"` mode.
250
+
251
+ Off by default. Projects that don't enable it get zero behavior change; setting `cms.sysadmin: true` and granting a user `user.role = "sysadmin"` is the only way to unlock the cross-tenant view.
234
252
 
235
253
  ## Account UI Configuration
236
254
 
@@ -317,6 +317,40 @@ src/apps/ # Root assets directory
317
317
 
318
318
  On custom domains, each SPA is served at root (`/`) via hostname-based routing. On the unified domain, CMS is at `/cms/` and Account is at `/account/`.
319
319
 
320
+ ### Static Assets (`quickback/public/`)
321
+
322
+ Anything you drop under `quickback/public/` is copied verbatim into `src/apps/` on every compile. The compiler does not parse, template, or otherwise touch these files — they are bytes that ride past it into the Cloudflare ASSETS binding.
323
+
324
+ ```
325
+ quickback/public/ # Source — checked into your repo
326
+ ├── favicon.ico
327
+ ├── robots.txt
328
+ ├── og/
329
+ │ └── og-image.png
330
+ └── pdfs/
331
+ └── whitepaper.pdf
332
+ ```
333
+
334
+ After compile:
335
+
336
+ ```
337
+ src/apps/ # Destination — written by the CLI
338
+ ├── favicon.ico # Served at https://your-domain/favicon.ico
339
+ ├── robots.txt # Served at /robots.txt
340
+ ├── og/og-image.png # Served at /og/og-image.png
341
+ ├── pdfs/whitepaper.pdf
342
+ ├── cms/ # Compiler-emitted SPA (don't shadow)
343
+ └── account/ # Compiler-emitted SPA (don't shadow)
344
+ ```
345
+
346
+ Notes:
347
+
348
+ - The folder is optional. If it doesn't exist, this step is a no-op.
349
+ - Files removed from `quickback/public/` disappear from `src/apps/` on the next compile — `src/` is wiped and rewritten each run.
350
+ - Hidden entries (`.DS_Store`, `.git/`, dotfiles) are skipped.
351
+ - A file in `quickback/public/` that would overwrite a compiler-emitted path (e.g. `quickback/public/cms/index.html`) fails the compile with a clear error rather than silently shadowing the SPA shell.
352
+ - Binaries (images, fonts, PDFs) are copied byte-for-byte — there is no string round-trip.
353
+
320
354
  ### Generated Wrangler Assets Config
321
355
 
322
356
  The compiler always generates `run_worker_first = true` when SPAs are enabled — the Worker handles all SPA routing (per hostname and per path prefix):