@quickback-dev/cli 0.47.15 → 0.48.1

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 (38) hide show
  1. package/dist/commands/compile.d.ts.map +1 -1
  2. package/dist/commands/compile.js +13 -2
  3. package/dist/commands/compile.js.map +1 -1
  4. package/dist/commands/migrations.d.ts +10 -0
  5. package/dist/commands/migrations.d.ts.map +1 -1
  6. package/dist/commands/migrations.js +113 -79
  7. package/dist/commands/migrations.js.map +1 -1
  8. package/dist/commands/migrations.test.js +96 -1
  9. package/dist/commands/migrations.test.js.map +1 -1
  10. package/dist/docs/content.js +12 -12
  11. package/dist/docs/content.js.map +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/skill/docs/changelog.md +119 -0
  15. package/dist/skill/docs/compiler/config/providers.md +23 -2
  16. package/dist/skill/docs/compiler/definitions/actions.md +12 -2
  17. package/dist/skill/docs/compiler/definitions/encryption.md +2 -0
  18. package/dist/skill/docs/compiler/definitions/schema.md +2 -0
  19. package/dist/skill/docs/compiler/targets/hono-api/database/neon.md +306 -35
  20. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +14 -8
  21. package/dist/skill/docs/stack/realtime/durable-objects.md +151 -10
  22. package/dist/skill/docs/stack/realtime/index.md +22 -3
  23. package/dist/skill/docs/stack/realtime/live-views.md +6 -4
  24. package/dist/skill/docs/stack/realtime/using-realtime.md +1 -1
  25. package/dist/skill/docs/stack/webhooks/outbound.md +23 -0
  26. package/package.json +1 -1
  27. package/src/skill/docs/changelog.md +119 -0
  28. package/src/skill/docs/compiler/config/providers.md +23 -2
  29. package/src/skill/docs/compiler/definitions/actions.md +12 -2
  30. package/src/skill/docs/compiler/definitions/encryption.md +2 -0
  31. package/src/skill/docs/compiler/definitions/schema.md +2 -0
  32. package/src/skill/docs/compiler/targets/hono-api/database/neon.md +306 -35
  33. package/src/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +14 -8
  34. package/src/skill/docs/stack/realtime/durable-objects.md +151 -10
  35. package/src/skill/docs/stack/realtime/index.md +22 -3
  36. package/src/skill/docs/stack/realtime/live-views.md +6 -4
  37. package/src/skill/docs/stack/realtime/using-realtime.md +1 -1
  38. package/src/skill/docs/stack/webhooks/outbound.md +23 -0
@@ -49,7 +49,9 @@ The Broadcaster Durable Object runs **inline** in your main Quickback worker —
49
49
 
50
50
  ## Enabling Realtime
51
51
 
52
- Add `realtime` to individual table definitions:
52
+ Broadcasting is **opt-in per resource**, exactly like CRUD — a table broadcasts
53
+ only if it declares its own `realtime` block. Add `realtime` to individual table
54
+ definitions:
53
55
 
54
56
  ```typescript
55
57
  export default defineTable(applications, {
@@ -59,13 +61,30 @@ export default defineTable(applications, {
59
61
  onInsert: true,
60
62
  onUpdate: true,
61
63
  onDelete: true,
62
- requiredRoles: ["recruiter", "hiring-manager"],
64
+ // Audience — WHO may receive these live rows. Same { roles } shape as
65
+ // read.access / crud.*.access. MANDATORY and fail-closed: a broadcast
66
+ // reaches every subscriber in the room, so the audience is not optional.
67
+ // Omit it (or leave it empty) and compilation fails. Roles may be concrete
68
+ // membership/scope roles or UPPERCASE pseudo-roles.
69
+ access: { roles: ["recruiter", "hiring-manager"] },
63
70
  fields: ["id", "candidateId", "stage"],
64
71
  },
65
72
  });
66
73
  ```
67
74
 
68
- And enable the realtime binding in your database config. The compiler generates the Durable Object class, helper functions, and wrangler bindings — all within your main worker.
75
+ > There is **no implicit fanout**. A resource with a broadcasting `realtime` block
76
+ > must declare a non-empty `access.roles`, and an empty audience delivers to *no
77
+ > one*. To broadcast to everyone in the room, say so deliberately with
78
+ > `access: { roles: ["PUBLIC"] }`. (`requiredRoles` is the deprecated spelling of
79
+ > `access.roles` — it still compiles but should be migrated.)
80
+
81
+
82
+ And enable the realtime **transport** in your database config. This is a
83
+ project-level switch that stands up the Broadcaster Durable Object + the
84
+ ws-ticket connection route; it does **not** by itself make any resource
85
+ broadcast (that's the per-resource `realtime` block above). The compiler
86
+ generates the Durable Object class, helper functions, and wrangler bindings —
87
+ all within your main worker.
69
88
 
70
89
  ```typescript
71
90
  providers: {
@@ -145,10 +145,12 @@ are emitted as `DELETE` so the row leaves the surface.
145
145
  - Each included table's `firewall` + `masking` apply on both the initial
146
146
  materialize and the live deltas (masking is applied per subscriber role at
147
147
  fanout), so the two are consistent.
148
- - A table-level `realtime.requiredRoles` declaration is honored on view
149
- deltas too (v0.46+): `view_changes` for that table fan out only to
150
- subscribers holding one of the required roles, exactly like its row-stream
151
- broadcasts. Tables without `requiredRoles` are unaffected.
148
+ - A table-level `realtime.access.roles` audience is honored on view deltas
149
+ too: `view_changes` for that table fan out only to subscribers within the
150
+ declared audience (evaluated with the same pseudo-role semantics as REST),
151
+ exactly like its row-stream broadcasts. Tables that don't declare a
152
+ broadcasting `realtime` block don't emit row-stream broadcasts, but their
153
+ rows can still surface through a live view they participate in.
152
154
  - **Stricter-child guard.** When a reverse-FK child's firewall is *stricter*
153
155
  than the root's (e.g. an owner-scoped note under an org-scoped person), the
154
156
  raw child row is **never broadcast**. Instead the server emits a *resync
@@ -130,7 +130,7 @@ Custom namespaces (from `defineRealtime()`) use the format `namespace:event` —
130
130
 
131
131
  ### Role-Based Filtering
132
132
 
133
- Events are only delivered to users whose role matches the broadcast's `targetRoles`. If a table's realtime config specifies `requiredRoles: ["hiring-manager", "recruiter"]`, only users with those roles receive the events. This applies to generated CRUD broadcasts and to [live view](/stack/realtime/live-views) `view_changes` deltas alike, enforced at fanout (v0.46+ — recompile and redeploy to pick up the enforcement).
133
+ Events are only delivered to subscribers who fall within the broadcast's audience. A broadcasting table's realtime config **must** declare `access: { roles: [...] }` — e.g. `access: { roles: ["hiring-manager", "recruiter"] }` delivers only to those roles. The audience is evaluated at fanout with the same uppercase pseudo-role semantics as REST (`PUBLIC` = everyone in the room, `AUTHENTICATED`, `USER`, `SYSADMIN`), plus concrete membership/scope roles. This is **fail-closed**: an empty or omitted audience delivers to no one (and is a compile error for a broadcasting resource). Applies to generated CRUD broadcasts and to [live view](/stack/realtime/live-views) `view_changes` deltas alike.
134
134
 
135
135
  ### Per-Role Masking
136
136
 
@@ -275,6 +275,29 @@ database: defineDatabase("cloudflare-d1", {
275
275
 
276
276
  This generates the webhook database schema, routes, queue consumer, and all supporting code.
277
277
 
278
+ ### On Neon (Postgres)
279
+
280
+ Webhooks are supported on the `neon` provider too. `webhooksBinding` acts as a
281
+ pure enable flag — there is no separate webhooks database. The webhook tables
282
+ live in a dedicated `webhooks` Postgres schema of your single Neon database,
283
+ created by the standard drizzle migration set, and are locked down by an RLS
284
+ policy so only the Worker's internal service-role handle can touch them:
285
+
286
+ ```typescript
287
+ database: defineDatabase("neon", {
288
+ connectionMode: "http", // required for webhooks
289
+ webhooksBinding: "WEBHOOKS_DB", // enable flag; no D1 binding is emitted
290
+ // queue names stay configurable on any provider:
291
+ webhooksQueueName: "my-app-webhooks-queue",
292
+ webhooksDlqName: "my-app-webhooks-dlq",
293
+ })
294
+ ```
295
+
296
+ The D1-only keys `webhooksDatabaseId` / `webhooksDatabaseName` are rejected at
297
+ compile time on Neon, and webhooks require `connectionMode: 'http'` (the
298
+ Cloudflare default). Queue wiring (`WEBHOOKS_QUEUE`, the consumer, and the
299
+ dead letter queue) is identical across providers.
300
+
278
301
  ## See Also
279
302
 
280
303
  - [Inbound Webhooks](/stack/webhooks/inbound) — Receive webhooks from external services
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quickback-dev/cli",
3
- "version": "0.47.15",
3
+ "version": "0.48.1",
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",
@@ -2,6 +2,125 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Neon PostgreSQL reaches deploy parity with D1 (v0.50)
6
+
7
+ A Neon-backed service now compiles, typechecks, migrates, and deploys with the
8
+ same capability surface as a D1 service — over HTTP (`@neondatabase/serverless`),
9
+ the Cloudflare default. There is no Hyperdrive binding and no Neon Authorize /
10
+ JWKS configuration: the Worker verifies each caller, then writes the trusted
11
+ user/org/team context into transaction-local Postgres settings
12
+ (`set_config('request.jwt.claim.sub' | 'org_id' | 'team_id', …, true)`) as the
13
+ first statement of every query batch. RLS reads them through a compiler-defined
14
+ `auth.user_id()` shim and the `get_active_org_id()` helper — **not** a persisted
15
+ `user_sessions` mirror (which never shipped).
16
+
17
+ - **Background contexts run under a service-role handle.** Queue consumers, cron
18
+ schedules, and cross-tenant `unsafe` actions acquire `createServiceDb(env)`,
19
+ which sets `quickback.service_role = 'true'` (all request claims cleared);
20
+ every feature table carries a `<table>_service_role` RLS policy admitting
21
+ exactly that context. Unsafe-action audit events are unchanged.
22
+ - **Webhooks port to a `webhooks` Postgres schema** in the same database (no
23
+ `WEBHOOKS_DB` binding). `webhooksBinding` is a pure enable flag on Neon; the
24
+ D1-only `webhooksDatabaseId` / `webhooksDatabaseName` keys are rejected. The
25
+ store is service-role-only.
26
+ - **`.encrypted()` / `.sealed()` columns are supported** on Neon over HTTP: the
27
+ key/vault tables fold into the journaled migration set with org-scoped and
28
+ service-role-only RLS.
29
+ - **Batch transactions advertise the truth.** Neon HTTP is fail-fast and
30
+ non-transactional (`meta.transactional: false`, like D1) because
31
+ `drizzle-orm/neon-http` has no interactive transactions; Neon WebSocket
32
+ (Node/Bun) gets real rollback (`meta.transactional: true`).
33
+ - **Deploy glue matches D1:** a generated `deploy` script
34
+ (`npm run db:migrate && wrangler deploy`), a boot check asserting
35
+ `DATABASE_URL`, `.dev.vars.example` (wrangler dev reads `.dev.vars`, not
36
+ `.env`) gitignored, and `drizzle.config.ts` preferring
37
+ `DATABASE_MIGRATION_URL ?? DATABASE_URL` for the privileged migration role.
38
+ - **Fail-closed capability gates:** managed file storage (use presign-only R2),
39
+ the Better Auth `subscriptions` plugin, raw `sqliteTable` interop sources on a
40
+ Postgres target, and — under WebSocket mode — webhooks / unsafe actions /
41
+ encrypted columns are all compile-time errors rather than silently-broken
42
+ output. Mixed database providers remain unsupported.
43
+ - **Docs corrected:** the [Neon page](/compiler/targets/hono-api/database/neon)
44
+ no longer describes Neon Authorize, a `user_sessions` table, or Hyperdrive —
45
+ none of which the compiler emits.
46
+
47
+ ### Realtime identity tags — one send reaches a person on either auth door (v0.49)
48
+
49
+ WebSocket connections now carry **identity tags**, proven at ticket mint and
50
+ signed into the ws-ticket (never client-supplied): `user:<userId>` for every
51
+ Better Auth caller, plus `scope:<kind>:<subjectId>` whenever a scope subject is
52
+ proven — on **either** door. A sessionless scope principal's claim and a Better
53
+ Auth caller's matched relationship lane stamp the **identical** subject-keyed
54
+ tag (both derive from the same relationship row), so senders no longer
55
+ double-send per recipient to cover `subject: 'both'` roles.
56
+
57
+ - **`targetTags` on every send** (`realtime.broadcast`, `realtime.insert`, …):
58
+ delivery is the deduplicated union of the runtime's indexed
59
+ `getWebSockets(tag)` lookup — no per-frame attachment scan. Replaces the
60
+ `userId` identity arm when present; the scope/org bind and `targetRoles`
61
+ audience still apply.
62
+ - **Fail-closed:** `targetTags: []` delivers to nobody, consistent with the
63
+ empty-audience rule.
64
+ - Tags are immutable for a socket's lifetime (hibernation-tag semantics);
65
+ limits (10/socket, 256 chars) are validated at mint — rejected, never
66
+ truncated.
67
+
68
+ ### Realtime authorization lease — hibernated sockets no longer outlive revocation (v0.49)
69
+
70
+ A ws-ticket was verified once at upgrade, and DO hibernation kept the socket
71
+ authorized forever — bans, member removal, and subject revocation never touched
72
+ a live connection. Connections now carry a delivery-time **authorization
73
+ lease** (default **15 minutes**, from ticket `iat`):
74
+
75
+ - The fan-out skips expired connections (they receive nothing) and closes them
76
+ with code **4401**; inbound messages — even pings — are enforced the same way.
77
+ - **In-place renewal:** `{ type: "reauth", ticket: "<fresh ws-ticket>" }`
78
+ extends the lease and refreshes roles without socket churn. Renewal is
79
+ strict — same `userId`, same scope/org, exact same tag set (tags are
80
+ immutable); identity drift closes with 4401 → reconnect fresh.
81
+ - Renewal tickets come from `POST /broadcast/v1/ws-ticket`, which re-runs the
82
+ **full** authorization gate (session, KV revocation, relationship/scope-claim
83
+ probes) — so revocation propagates within one lease period, with no KV reads
84
+ in the Durable Object.
85
+ - Configure via `realtime: { lease: '15m' | seconds | false }` (min 60s;
86
+ `false` disables — discouraged). Clients that never reauth degrade gracefully
87
+ to one forced reconnect per lease.
88
+
89
+ ### Realtime broadcasts are fail-closed — explicit per-resource audience (BREAKING)
90
+
91
+ Realtime broadcasting is now opt-in **per resource** with a **mandatory audience**,
92
+ mirroring how CRUD is explicit. This closes a fanout footgun where a resource that
93
+ never mentioned realtime could still broadcast its rows to an entire room.
94
+
95
+ - **`realtime.access: { roles: [...] }`** is the audience — same `{ roles }` shape
96
+ as `read.access` / `crud.*.access`. A subscriber receives a live row iff that
97
+ role bucket would admit them at REST. Roles may be concrete membership/scope
98
+ roles or UPPERCASE pseudo-roles (`PUBLIC`, `AUTHENTICATED`, `USER`, `SYSADMIN`).
99
+ - **Fail-closed, at compile time** — a broadcasting resource with no/empty audience
100
+ is a **compile error** naming the resource. There is no implicit fanout. To
101
+ broadcast to everyone in the room, say so deliberately with `access: { roles: ['PUBLIC'] }`.
102
+ - **Fail-closed, at runtime** — the Broadcaster now treats an **empty audience as
103
+ nobody** (previously: everybody) and evaluates the uppercase pseudo-roles exactly
104
+ as the REST access evaluator does (`userRole` is threaded through the ws-ticket
105
+ for `USER`/`SYSADMIN`).
106
+ - **No project-wide auto-broadcast** — `providers.database.config.realtime` now
107
+ only wires the transport (Broadcaster DO + ws-ticket route); it no longer
108
+ enables broadcasts on any resource.
109
+ - **Migration** — a project that relied on the project-wide auto-broadcast must add
110
+ an explicit `realtime: { enabled: true, access: { roles: [...] } }` block to each
111
+ resource that should broadcast. `requiredRoles` is the deprecated spelling of
112
+ `access.roles` (still compiles, normalized internally). `q-events` `guests`
113
+ demonstrates the staff-lane pattern (`access: { roles: ['admin','member'] }`,
114
+ event-scoped, masked).
115
+
116
+ ### Deterministic codegen output
117
+
118
+ The compiler now sorts every filesystem-discovered collection (features, and each
119
+ `services.*` group) by a stable key before generating, so recompiles produce
120
+ byte-identical output regardless of the CLI's directory-scan order. Eliminates the
121
+ churny, behavior-neutral diffs (queue-consumer case order, auth blocks, schema
122
+ imports) that appeared across machines/CLI versions.
123
+
5
124
  ### `acceptScope`: one namespaced handler for the user AND the sessionless principal
6
125
 
7
126
  A project-level namespace can now **accept an already-minted scope claim as
@@ -64,7 +64,13 @@ Two databases are supported, both Cloudflare-native:
64
64
  | Provider | Description |
65
65
  |----------|-------------|
66
66
  | `cloudflare-d1` | Cloudflare D1 (SQLite at the edge) |
67
- | `neon` | Neon (PostgreSQL over Hyperdrive) |
67
+ | `neon` | Neon serverless PostgreSQL (`@neondatabase/serverless` over HTTP) |
68
+
69
+ One database provider per app: auth tables and feature tables always share the
70
+ selected database. On `neon`, Better Auth uses its PostgreSQL/Drizzle adapter
71
+ in the same Postgres database as your features; on `cloudflare-d1`, both use
72
+ D1. A per-service map (`database: { auth: ..., features: ... }`) is rejected at
73
+ compile time — mixed database providers are not supported.
68
74
 
69
75
  ```typescript
70
76
  import { defineDatabase } from "@quickback/compiler";
@@ -80,12 +86,16 @@ providers: {
80
86
 
81
87
  ### Database Options
82
88
 
89
+ Options from `splitDatabases` down apply to `cloudflare-d1` only — Neon uses a
90
+ single Postgres database with no bindings or split mode (see
91
+ [Neon options](#neon-options) below).
92
+
83
93
  | Option | Type | Default (D1) | Description |
84
94
  |--------|------|---------|-------------|
85
95
  | `generateId` | `string \| false` | `"prefixed"` | ID generation strategy |
86
96
  | `namingConvention` | `string` | `"snake_case"` | Column naming convention |
87
97
  | `usePlurals` | `boolean` | `false` | Pluralize auth table names (e.g. `user` vs `users`) |
88
- | `splitDatabases` | `boolean` | `true` | Separate auth and features databases |
98
+ | `splitDatabases` | `boolean` | `true` | Separate auth and features databases (D1 only) |
89
99
  | `authBinding` | `string` | `"AUTH_DB"` | Binding name for auth database |
90
100
  | `featuresBinding` | `string` | `"DB"` | Binding name for features database |
91
101
  | `databaseId` | `string` | — | D1 database ID for the features database (used in generated wrangler.toml) |
@@ -100,6 +110,17 @@ providers: {
100
110
  | `realtime` | `boolean \| { enabled?, wsTicket? }` | `false` | Enables the Broadcaster Durable Object and optional resource-scoped ws-ticket auth (see [below](#realtime-broadcast-config)) |
101
111
  | `webhookAdminRoles` | `string[]` | `["owner", "admin"]` | Org roles allowed to manage webhook endpoints |
102
112
 
113
+ #### Neon Options
114
+
115
+ | Option | Type | Default | Description |
116
+ |--------|------|---------|-------------|
117
+ | `connectionMode` | `"auto" \| "http" \| "websocket"` | `"auto"` | How the generated runtime connects (`auto` detects the runtime) |
118
+ | `pooled` | `boolean` | `true` | Use the pooled Neon connection string (recommended for Workers) |
119
+
120
+ The Worker connects through a single `DATABASE_URL` secret — auth and feature
121
+ queries share it. See [Neon](/compiler/targets/hono-api/database/neon) for
122
+ connection modes, RLS, and the migration workflow.
123
+
103
124
  #### Audit Database
104
125
 
105
126
  Cross-tenant `unsafe` actions (see [Actions → Unsafe mode](/compiler/definitions/actions#unsafe-mode)) write mandatory audit events. Those events land in a dedicated D1 database — separate from your features DB — so audit history stays isolated from application data and can't be tampered with through a normal CRUD route.
@@ -309,9 +309,9 @@ land in `success[]` masked the same way the single-record response is.
309
309
 
310
310
  | Provider | failFast | transactional | Behavior |
311
311
  |---|---|---|---|
312
- | neon (Postgres via Hyperdrive) | `true` | `true` | `db.transaction()` wraps the loop; any throw rolls back all writes |
312
+ | tx-supporting (postgres, neon over websocket) | `true` | `true` | `db.transaction()` wraps the loop; any throw rolls back all writes |
313
313
  | (any) | `false` | `false` | Independent per-record outcomes, partial success |
314
- | cloudflare-d1 | `true` | `false` | Fail-fast loop without rollback — earlier records stay committed (D1 has no `db.transaction`) |
314
+ | cloudflare-d1, neon over http (Cloudflare default) | `true` | `false` | Fail-fast loop without rollback — earlier records stay committed (the driver has no `db.transaction`; `drizzle-orm/neon-http` throws at runtime) |
315
315
 
316
316
  **Constraints:**
317
317
 
@@ -694,6 +694,16 @@ Unsafe cross-tenant actions are generated with:
694
694
  - sysadmin gate (`ctx.userRole === "sysadmin"`)
695
695
  - mandatory audit logging on deny/success/error
696
696
 
697
+ **Provider note (Neon):** on Neon the request-scoped db enforces Row Level
698
+ Security with the *caller's* org claims, which would filter out exactly the
699
+ cross-tenant rows unsafe actions exist to reach. Unsafe handlers therefore
700
+ acquire a dedicated service-role handle (`createServiceDb`) that sets the
701
+ `quickback.service_role` transaction marker instead of caller claims; the
702
+ generated RLS grants that context an explicit per-table bypass policy. The
703
+ audit-logging contract is identical to D1. Neon with
704
+ `connectionMode: 'websocket'` does not support unsafe actions yet and fails
705
+ the compile with a descriptive error.
706
+
697
707
  `PUBLIC` actions also receive mandatory audit logging (same audit table), since unauthenticated endpoints are high-risk by nature.
698
708
 
699
709
  Without unsafe mode, `unsafeDb` is `undefined` in the executor params.
@@ -45,6 +45,7 @@ Ciphertext cannot be queried, so encrypted columns are **excluded from every que
45
45
  - Never an `embeddings.fields` source (embedding a value ships its plaintext to the model)
46
46
  - The table must carry a `q.scope('organization')` column — keys are per-organization
47
47
  - Text-shaped columns only (v1)
48
+ - Database provider must be **Cloudflare D1** or **Neon over HTTP** (the Cloudflare default). Anything else — including Neon's websocket mode — is a compile error, never silently-plaintext output. On Neon, `org_data_keys` lives in the `app` Postgres schema with org-scoped row-level security: a request-scoped connection can read and lazily create exactly its own organization's wrapped-key row; rotation and crypto-shredding are service-role operations.
48
49
 
49
50
  Encrypted columns **may** appear in view projections and responses — they decrypt through the generated prepare path. Masking composes on top as defense-in-depth.
50
51
 
@@ -168,6 +169,7 @@ Sealed values are opaque references at rest, so they're fenced off from every su
168
169
  - The table **must** carry a `q.scope('organization')` column — keys are per-scope.
169
170
  - Reading a sealed column server-side is a **type error**: the column is branded `$type<SealedValue>()`, an opaque non-string, so `db.select()` on it won't typecheck. The server's structural inability to read it is enforced by `tsc`, not convention.
170
171
  - Sealed projects **force-enable** KV-backed JWT revocation (so a revoked reader's in-flight reveal token dies); a project with sealed columns and no KV binding **fails to compile**.
172
+ - Database provider must be **Cloudflare D1** or **Neon over HTTP** (the Cloudflare default) — anything else fails to compile. On Neon, the seal/vault tables carry **deny-all row-level security for request connections**: only the worker-internal service-role lane (the generated `/seal/v1` routes, `ctx.seal`, and the sealed write chokepoint) can touch them, and every one of those queries is still explicitly organization-scoped.
171
173
 
172
174
  ## What this tier does and doesn't claim
173
175
 
@@ -208,6 +208,8 @@ Default to `feature()`. Drop to Drizzle only when:
208
208
 
209
209
  Features in the same project may mix freely — Quickback dispatches per feature — so one interop table doesn't force the rest of the project off `feature()`.
210
210
 
211
+ One dialect rule: interop files **without** a `defineTable(...)` default export (internal child tables) are not dialect-translated — author them in the target database's dialect. On Postgres providers (Neon, Supabase), a `sqliteTable` interop source without `defineTable` is a compile-time error; write it with `pgTable` from `drizzle-orm/pg-core` instead. Sources **with** `defineTable(...)` keep compiling across dialects automatically.
212
+
211
213
  ### Drizzle Column Types
212
214
 
213
215
  Drizzle supports all standard SQL column types: