@quickback-dev/cli 0.47.6 → 0.47.8

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":"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,26iGAA26iG;KACv7iG;IACD,4BAA4B,EAAE;QAC5B,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,giRAAgiR;KAC5iR;IACD,wCAAwC,EAAE;QACxC,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,kmEAAkmE;KAC9mE;IACD,6BAA6B,EAAE;QAC7B,OAAO,EAAE,eAAe;QACxB,SAAS,EAAE,0jSAA0jS;KACtkS;IACD,mCAAmC,EAAE;QACnC,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,iuGAAiuG;KAC7uG;IACD,yBAAyB,EAAE;QACzB,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,4kFAA4kF;KACxlF;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,2ySAA2yS;KACvzS;IACD,sBAAsB,EAAE;QACtB,OAAO,EAAE,YAAY;QACrB,SAAS,EAAE,0jTAA0jT;KACtkT;IACD,0BAA0B,EAAE;QAC1B,OAAO,EAAE,iBAAiB;QAC1B,SAAS,EAAE,yjQAAyjQ;KACrkQ;IACD,yBAAyB,EAAE;QACzB,OAAO,EAAE,2BAA2B;QACpC,SAAS,EAAE,0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AwC;IACxC,oCAAoC;IACpC,wBAAwB;IACxB,kBAAkB;IAClB,iCAAiC;IACjC,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,6BAA6B;IAC7B,+BAA+B;IAC/B,4BAA4B;IAC5B,4BAA4B;IAC5B,oBAAoB;IACpB,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,2BAA2B;IAC3B,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,42sGAA42sG;KACx3sG;IACD,4BAA4B,EAAE;QAC5B,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,giRAAgiR;KAC5iR;IACD,wCAAwC,EAAE;QACxC,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,kmEAAkmE;KAC9mE;IACD,6BAA6B,EAAE;QAC7B,OAAO,EAAE,eAAe;QACxB,SAAS,EAAE,0jSAA0jS;KACtkS;IACD,mCAAmC,EAAE;QACnC,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,iuGAAiuG;KAC7uG;IACD,yBAAyB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AkC;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.47.6";
13
+ const CLI_VERSION = "0.47.8";
14
14
  function getPackageVersion() {
15
15
  return CLI_VERSION;
16
16
  }
@@ -265,6 +265,7 @@ The path layout mirrors the public docs site (https://docs.quickback.dev). Open
265
265
  - `masking` — types, `show:`, search/filter gating, auto-detection
266
266
  - `read` — `read.access`, `read.views`, `read.query`, pagination + filtering
267
267
  - `views` — named projections with column-level access
268
+ - `triggers` — Postgres-style table triggers: `sql:` → real SQLite trigger (all write paths, atomic), `handler:` → app hook at the write chokepoint (before mutate/reject, awaited after)
268
269
  - `actions` — record-based vs standalone, transitions, `unsafe:`, `whereRecord(table)`, `ActionError`, `authDb`
269
270
  - `validation` — minLength, max, enum, pattern, email
270
271
  - `concepts` — secure-by-default, defense in depth, request flow
@@ -1,5 +1,89 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### Envelope encryption — `q.text().encrypted()` (encryption pillar, Phase 1)
6
+
7
+ Mark a text column `.encrypted()` and it is AES-256-GCM-encrypted at rest
8
+ under a **per-organization key**: a database breach (backup, export, leaked
9
+ token, SQL injection, insider read) yields only ciphertext for that column.
10
+ See [Encryption](/compiler/definitions/encryption).
11
+
12
+ - Per-org DEKs live wrapped under the `ENCRYPTION_KEK` worker secret in a
13
+ compiler-owned `org_data_keys` table (lazily created, versioned for
14
+ rotation). Deleting an org's row **crypto-shreds** every value it wrote.
15
+ - One write chokepoint: CRUD, batch, and action-layer `db.insert/update`
16
+ all encrypt through the audit wrapper — audit snapshots, webhook
17
+ payloads, and realtime deltas carry ciphertext by construction.
18
+ - Reads decrypt behind the firewall then apply masking; encrypted columns
19
+ are compile-time excluded from `?search`/`?filter`/`?sort`, view query
20
+ allowlists, and embedding sources.
21
+ - `ctx.crypto.encrypt/decrypt` for explicit server-side processing in
22
+ actions; boot guard refuses to serve without the KEK (503 `MISSING_ENV`);
23
+ scaffolded `.dev.vars` now includes a generated `ENCRYPTION_KEK`.
24
+ - The sealed (E2EE) and vault tiers remain compile-gated until built —
25
+ roadmap in `apps/compiler/research/encryption-vault-spec.md`.
26
+
27
+
28
+ ### Postgres-style table triggers (`defineTable` / `feature` `triggers:`)
29
+
30
+ Tables can now declare `before`/`after` triggers on `insert`/`update`/
31
+ `delete`, with two lowering lanes and a per-trigger compile report. See
32
+ [Triggers](/compiler/definitions/triggers) for the full reference.
33
+
34
+ - **`sql:` entries** compile to real SQLite `CREATE TRIGGER` statements,
35
+ shipped in the journaled features migration (content-addressed — an
36
+ unchanged trigger set appends nothing; removing a trigger drops it on the
37
+ next migrate). They fire for **every** write path including raw SQL, run
38
+ atomically with the triggering statement (the only transactional option
39
+ on D1), support `when:` guards and `RAISE(ABORT, ...)` rejection, and
40
+ `OLD.`/`NEW.` column references are validated at compile time. The
41
+ compiler owns the `BEGIN`/`END` frame — emitted uppercase, since
42
+ lowercase `begin` breaks remote D1's statement splitter. On soft-delete
43
+ tables, `*Delete` events map to the `deleted_at` transition (plus a
44
+ hard-delete variant) and `*Update` events exclude it, so a soft delete
45
+ fires delete triggers exactly once. D1 only.
46
+ - **`handler:` entries** run as application hooks at the audit-wrapper
47
+ write chokepoint (REST CRUD + actions). `before*` hooks are synchronous
48
+ and can mutate the payload or throw to reject — the write never executes
49
+ and the request gets `TRIGGER_REJECTED` (422); audit fields are
50
+ re-stamped after hooks and cannot be forged. `after*` hooks run once per
51
+ returned row and are **awaited** — a throw surfaces as
52
+ `TRIGGER_AFTER_FAILED` (500) with `details.committed: true` since the
53
+ write already persisted. Handlers get `{ table, op, values|row, ctx, db,
54
+ env }`; the `db` is audit-wrapped at cascade depth + 1, so hook writes
55
+ stamp audit fields, emit live-view deltas, and fire nested triggers,
56
+ bounded by a depth cap of 5. Each table's drizzle object is auto-imported
57
+ into the generated registry under its authored name, and handler imports
58
+ are usage-filtered and hoisted.
59
+
60
+ The compile output includes a lowering/coverage report and fail-closed
61
+ warnings: `handler:` triggers do **not** fire for queue handlers, cron, or
62
+ raw SQL — guards that must hold universally should use `sql:` +
63
+ `RAISE(ABORT)`. `async: true` (queue-dispatched after-hooks) and
64
+ `withOld: true` (previous-row access) are reserved and rejected at compile
65
+ time until they ship.
66
+
67
+ Also in this change:
68
+
69
+ - New `trigger` error layer with `TRIGGER_REJECTED` / `TRIGGER_AFTER_FAILED`
70
+ codes in the generated error catalog, OpenAPI spec, and SDK types.
71
+ - Parser: function-valued properties in `defineTable`/`feature` configs now
72
+ parse as compile-time source carriers instead of failing the whole config
73
+ with "no dynamic expressions" — unblocks trigger handlers (and
74
+ function-form `access:` / custom masks) through the CLI source path.
75
+ - Fixed a column-injection bug where a comment merely mentioning a column
76
+ name (e.g. `"deleted_at"` in a docblock) suppressed audit/soft-delete
77
+ column injection for the table.
78
+ - Fixed a silent no-op: a project declaring `services/queues/*.ts` handlers
79
+ without embeddings or `additionalQueues` deployed a wired `queue` export
80
+ with no `[[queues.consumers]]` to feed it — the handlers were dead code.
81
+ The primary queue (and its typed env binding) is now emitted for
82
+ handlers-only projects, with a compile notice that Cloudflare Queues
83
+ requires the paid Workers plan. Queue emission remains strictly opt-in by
84
+ usage: projects with no queue-backed features (embeddings, queue
85
+ handlers, `additionalQueues`, webhooks) emit no queue configuration and
86
+ deploy on the free plan.
3
87
  ## v0.47.0 — June 11, 2026
4
88
 
5
89
  ### Breaking: zero-false-positive analyzer checks are now compile errors
@@ -0,0 +1,62 @@
1
+ # Encryption
2
+
3
+ Mark a text column `.encrypted()` and Quickback envelope-encrypts it at rest with a **per-organization key**:
4
+
5
+ ```typescript
6
+ export default feature('guests', {
7
+ columns: {
8
+ id: q.id(),
9
+ organizationId: q.scope('organization'), // required — keys are per-org
10
+ name: q.text().required(),
11
+ emergencyContact: q.text().encrypted(),
12
+ dietaryNotes: q.text().encrypted(),
13
+ },
14
+ read: { access: { roles: ['member+'] } },
15
+ create: { access: { roles: ['member+'] } },
16
+ });
17
+ ```
18
+
19
+ That one modifier changes what a database breach means: a leaked D1 backup, export, or stolen database token yields only ciphertext for those columns. The keys live separately, wrapped under a worker secret the database never sees.
20
+
21
+ ## What the compiler generates
22
+
23
+ - **`org_data_keys`** — one row per organization holding a random 256-bit data key (DEK), stored **wrapped** under the `ENCRYPTION_KEK` worker secret. Created lazily on the org's first encrypted write.
24
+ - **Write path** — every write (CRUD routes, batch routes, and `db.insert`/`db.update` inside your actions) flows through the same chokepoint, which AES-256-GCM-encrypts the column before anything else sees it. Audit snapshots, webhook payloads, and realtime deltas therefore carry ciphertext by construction.
25
+ - **Read path** — generated routes decrypt behind the firewall and then apply masking, so authorized callers see plaintext and everyone else sees the redaction — never ciphertext.
26
+ - **`ctx.crypto`** — explicit `await ctx.crypto.decrypt(value)` / `ctx.crypto.encrypt(value)` for action code that processes the field server-side (building a manifest, sending an email). Scoped to the caller's active organization.
27
+ - **Boot guard** — a project with encrypted columns refuses to serve without `ENCRYPTION_KEK` (503 `MISSING_ENV`), instead of silently storing plaintext.
28
+
29
+ Values at rest look like `qbenc:1:<keyVersion>:<iv>:<ciphertext>` — the prefix makes accidental plaintext detectable, and the embedded key version supports rotation with lazy re-encryption on write.
30
+
31
+ ## Setup
32
+
33
+ Scaffolded projects already have a generated `ENCRYPTION_KEK` in `.dev.vars`, so local dev works with zero setup. For production:
34
+
35
+ ```bash
36
+ openssl rand -hex 32 | wrangler secret put ENCRYPTION_KEK
37
+ ```
38
+
39
+ ## Rules the compiler enforces
40
+
41
+ Ciphertext cannot be queried, so encrypted columns are **excluded from every query surface at compile time** — these are errors, not warnings:
42
+
43
+ - No `.filterable()` / `.searchable()`, and never listed in a view's `query.{searchable,filterable,sortable}`
44
+ - No `.unique()` (AES-GCM randomizes ciphertext per write), no primary keys, no `.references()`, no `q.scope()` columns, no defaults (a SQL default would bypass the encrypting chokepoint)
45
+ - Never an `embeddings.fields` source (embedding a value ships its plaintext to the model)
46
+ - The table must carry a `q.scope('organization')` column — keys are per-organization
47
+ - Text-shaped columns only (v1)
48
+
49
+ 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
+ ## Per-organization keys: blast radius and crypto-shredding
52
+
53
+ Each organization's data is encrypted under its own DEK, so one compromised key never exposes another tenant. Deleting an org's `org_data_keys` row makes every encrypted value it ever wrote **permanently unreadable** — the cleanest possible GDPR-erasure and offboarding story.
54
+
55
+ ## What this tier does and doesn't claim
56
+
57
+ The envelope tier protects against **storage compromise**: backups, exports, dashboard access, leaked database tokens, SQL injection, and insiders with database read access all get ciphertext. The server *can* decrypt — that's the point; your actions still process the field. It does not protect against full Worker compromise (the sealed/E2EE tier in the encryption roadmap addresses that — see `apps/compiler/research/encryption-vault-spec.md`).
58
+
59
+ Two practical notes:
60
+
61
+ - **Action responses**: rows returned from `db.insert(...).returning()` inside your own actions contain ciphertext — decrypt explicitly with `ctx.crypto.decrypt()` if your action returns the field. Generated CRUD routes handle this automatically.
62
+ - **No server-side equality lookups** on encrypted values (blind indexes are a roadmap item). If you need to filter by it, it probably shouldn't be encrypted — or it needs a separate non-sensitive derived column.
@@ -0,0 +1,169 @@
1
+ # Triggers - Postgres-Style Table Triggers
2
+
3
+ Run logic when rows change — Postgres-style `before`/`after` triggers on `insert`/`update`/`delete`, declared per table.
4
+
5
+ Each trigger lowers one of two ways, and the compiler reports which:
6
+
7
+ | You write | Lowers to | Fires on |
8
+ |---|---|---|
9
+ | `sql:` | A real SQLite `CREATE TRIGGER` in your migrations | **Every** write path — REST, actions, queue handlers, cron, raw SQL. Atomic with the write. |
10
+ | `handler:` | An application hook at the audit-wrapper write chokepoint | Writes through the wrapped `db` — REST CRUD and actions. **Not** queue handlers, cron, or raw SQL. |
11
+
12
+ There is no auto-translation between the lanes: SQL bodies stay SQL, functions stay functions. Pick the lane by what the trigger must guarantee.
13
+
14
+ ## Basic Usage
15
+
16
+ ```typescript
17
+ // features/invoices/invoices.ts
18
+ import { feature, q } from '@quickback/compiler';
19
+
20
+ export default feature('invoices', {
21
+ columns: {
22
+ id: q.id(),
23
+ title: q.text({ maxLength: 200 }).required(),
24
+ notes: q.text({ maxLength: 2000 }).optional(),
25
+ total: q.int().default(0).required(),
26
+ status: q.enum(['draft', 'sent', 'paid']).default('draft').required(),
27
+ organizationId: q.scope('organization'),
28
+ },
29
+ read: { access: { roles: ['member'] } },
30
+ create: { access: { roles: ['member'] } },
31
+ update: { access: { roles: ['member'] } },
32
+ delete: { access: { roles: ['member'] }, mode: 'soft' },
33
+
34
+ triggers: {
35
+ beforeInsert: [
36
+ {
37
+ name: 'guardTotals',
38
+ handler: ({ values }) => {
39
+ if (values.total < 0) throw new Error('total must be >= 0');
40
+ return { notes: values.notes ?? 'created' }; // merge into the write
41
+ },
42
+ },
43
+ ],
44
+ afterInsert: [
45
+ {
46
+ // SQL lane — fires for raw SQL too, atomic with the insert
47
+ name: 'stampNotes',
48
+ sql: `UPDATE invoices SET notes = NEW.title WHERE id = NEW.id;`,
49
+ },
50
+ ],
51
+ beforeUpdate: [
52
+ {
53
+ // The universal-enforcement shape: WHEN guard + RAISE(ABORT)
54
+ name: 'lockPaid',
55
+ when: `OLD.status = 'paid' AND NEW.status != 'paid'`,
56
+ sql: `SELECT RAISE(ABORT, 'paid invoices cannot be reopened');`,
57
+ },
58
+ ],
59
+ },
60
+ });
61
+ ```
62
+
63
+ Events: `beforeInsert`, `afterInsert`, `beforeUpdate`, `afterUpdate`, `beforeDelete`, `afterDelete`. Each event takes an array of named triggers; names must be unique per event.
64
+
65
+ ## SQL triggers (`sql:`)
66
+
67
+ The compiler wraps your statements in a `CREATE TRIGGER` named
68
+ `qb_trg_<table>_<event>_<name>` and ships it in the journaled features
69
+ migration — content-addressed, so an unchanged trigger set produces no new
70
+ migration, and removing a trigger from config drops it from the database on
71
+ the next migrate.
72
+
73
+ - Write **bare, `;`-terminated statements** — the compiler owns the
74
+ `BEGIN`/`END` frame. (It emits the frame uppercase; lowercase `begin`
75
+ breaks remote D1's statement splitter even though local D1 accepts it.)
76
+ - `OLD.column` / `NEW.column` references use **SQL column names**
77
+ (`deleted_at`, not `deletedAt`) and are validated against the table at
78
+ compile time.
79
+ - Optional `when:` is a SQL expression guard (`WHEN` clause).
80
+ - To reject a write, `SELECT RAISE(ABORT, 'message');` — this is the only
81
+ trigger form that blocks *every* write path, including raw SQL.
82
+ - SQL triggers run inside the triggering statement — the only
83
+ transactional option on D1, which has no `db.transaction()`.
84
+
85
+ Currently supported on `cloudflare-d1` only; declaring `sql:` triggers on
86
+ another database provider is a compile error.
87
+
88
+ ### Soft-delete mapping
89
+
90
+ On soft-delete tables (the default), `*Delete` events map to the
91
+ soft-delete *transition* — the compiler emits an
92
+ `AFTER UPDATE OF "deleted_at" ... WHEN NEW."deleted_at" IS NOT NULL AND
93
+ OLD."deleted_at" IS NULL` trigger, plus a plain `AFTER DELETE` variant so
94
+ raw-SQL hard deletes are still covered. `*Update` events get the inverse
95
+ guard, so a soft delete fires delete triggers exactly once and never
96
+ double-fires as an update.
97
+
98
+ ## Handler triggers (`handler:`)
99
+
100
+ Handlers run at the same write chokepoint that powers audit stamping and
101
+ Live Views, with full application context:
102
+
103
+ ```typescript
104
+ handler: ({ table, op, values /* before */, row /* after */, ctx, db, env }) => { ... }
105
+ ```
106
+
107
+ - **`before*` hooks are synchronous.** Return a partial object to merge
108
+ into the write payload, or throw to reject — the write never executes and
109
+ the request gets a structured `TRIGGER_REJECTED` (422) error. Audit
110
+ fields (`createdBy`, `modifiedAt`, …) are re-stamped after hooks run and
111
+ cannot be forged.
112
+ - **`after*` hooks run once per affected row and are awaited** before the
113
+ write's promise resolves. They may be `async`. A throw surfaces as
114
+ `TRIGGER_AFTER_FAILED` (500) with `details.committed: true` — the row was
115
+ already persisted (no transactions on D1), so clients must not blind-retry.
116
+ - Handlers must be **inline arrow/function expressions**. Imports they
117
+ reference are hoisted into the generated registry, and each table's
118
+ drizzle object is auto-imported under its authored name — so this works
119
+ as written:
120
+
121
+ ```typescript
122
+ import { eq } from 'drizzle-orm';
123
+
124
+ // ...
125
+ afterUpdate: [
126
+ {
127
+ name: 'syncNotes',
128
+ handler: async ({ row, db }) => {
129
+ await db.update(invoices)
130
+ .set({ notes: `updated: ${row.title}` })
131
+ .where(eq(invoices.id, row.id));
132
+ },
133
+ },
134
+ ],
135
+ ```
136
+
137
+ `after*` hooks only receive rows when the write chain used `.returning()`
138
+ — generated CRUD routes and actions do.
139
+
140
+ ### Recursion
141
+
142
+ Trigger cascades are bounded in every lane:
143
+
144
+ - **Handler hooks**: the `db` a hook receives is re-wrapped at depth + 1.
145
+ A cascade deeper than 5 levels (a hook's write firing hooks that write
146
+ again, …) throws with the table/op that exceeded the cap.
147
+ - **SQL triggers**: SQLite's `recursive_triggers` pragma defaults off — a
148
+ trigger cannot re-enter itself, directly or through a cycle.
149
+
150
+ ### Coverage — read the compile report
151
+
152
+ Handler hooks do **not** fire for queue handlers, cron jobs, or raw SQL.
153
+ The compiler emits a per-trigger lowering report and warns at compile time
154
+ when a `before*` handler is used as a guard — if a rule must hold for every
155
+ write path, use the `sql:` lane with `RAISE(ABORT)`.
156
+
157
+ ## Choosing a lane
158
+
159
+ | Need | Use |
160
+ |---|---|
161
+ | Invariant that must hold universally (raw SQL included) | `sql:` with `RAISE(ABORT)` |
162
+ | Denormalized columns, counters, tombstones | `sql:` |
163
+ | Validation/derivation with application logic | `before*` `handler:` |
164
+ | Side-effects after a write (notify, write related rows) | `after*` `handler:` |
165
+ | Atomic with the write (D1 has no transactions) | `sql:` only |
166
+
167
+ Planned (not yet available — declaring them is a compile error rather than
168
+ a silent no-op): `async: true` queue-dispatched after-hooks with retries,
169
+ and `withOld: true` previous-row access on update/delete hooks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quickback-dev/cli",
3
- "version": "0.47.6",
3
+ "version": "0.47.8",
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",
@@ -265,6 +265,7 @@ The path layout mirrors the public docs site (https://docs.quickback.dev). Open
265
265
  - `masking` — types, `show:`, search/filter gating, auto-detection
266
266
  - `read` — `read.access`, `read.views`, `read.query`, pagination + filtering
267
267
  - `views` — named projections with column-level access
268
+ - `triggers` — Postgres-style table triggers: `sql:` → real SQLite trigger (all write paths, atomic), `handler:` → app hook at the write chokepoint (before mutate/reject, awaited after)
268
269
  - `actions` — record-based vs standalone, transitions, `unsafe:`, `whereRecord(table)`, `ActionError`, `authDb`
269
270
  - `validation` — minLength, max, enum, pattern, email
270
271
  - `concepts` — secure-by-default, defense in depth, request flow
@@ -1,5 +1,89 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### Envelope encryption — `q.text().encrypted()` (encryption pillar, Phase 1)
6
+
7
+ Mark a text column `.encrypted()` and it is AES-256-GCM-encrypted at rest
8
+ under a **per-organization key**: a database breach (backup, export, leaked
9
+ token, SQL injection, insider read) yields only ciphertext for that column.
10
+ See [Encryption](/compiler/definitions/encryption).
11
+
12
+ - Per-org DEKs live wrapped under the `ENCRYPTION_KEK` worker secret in a
13
+ compiler-owned `org_data_keys` table (lazily created, versioned for
14
+ rotation). Deleting an org's row **crypto-shreds** every value it wrote.
15
+ - One write chokepoint: CRUD, batch, and action-layer `db.insert/update`
16
+ all encrypt through the audit wrapper — audit snapshots, webhook
17
+ payloads, and realtime deltas carry ciphertext by construction.
18
+ - Reads decrypt behind the firewall then apply masking; encrypted columns
19
+ are compile-time excluded from `?search`/`?filter`/`?sort`, view query
20
+ allowlists, and embedding sources.
21
+ - `ctx.crypto.encrypt/decrypt` for explicit server-side processing in
22
+ actions; boot guard refuses to serve without the KEK (503 `MISSING_ENV`);
23
+ scaffolded `.dev.vars` now includes a generated `ENCRYPTION_KEK`.
24
+ - The sealed (E2EE) and vault tiers remain compile-gated until built —
25
+ roadmap in `apps/compiler/research/encryption-vault-spec.md`.
26
+
27
+
28
+ ### Postgres-style table triggers (`defineTable` / `feature` `triggers:`)
29
+
30
+ Tables can now declare `before`/`after` triggers on `insert`/`update`/
31
+ `delete`, with two lowering lanes and a per-trigger compile report. See
32
+ [Triggers](/compiler/definitions/triggers) for the full reference.
33
+
34
+ - **`sql:` entries** compile to real SQLite `CREATE TRIGGER` statements,
35
+ shipped in the journaled features migration (content-addressed — an
36
+ unchanged trigger set appends nothing; removing a trigger drops it on the
37
+ next migrate). They fire for **every** write path including raw SQL, run
38
+ atomically with the triggering statement (the only transactional option
39
+ on D1), support `when:` guards and `RAISE(ABORT, ...)` rejection, and
40
+ `OLD.`/`NEW.` column references are validated at compile time. The
41
+ compiler owns the `BEGIN`/`END` frame — emitted uppercase, since
42
+ lowercase `begin` breaks remote D1's statement splitter. On soft-delete
43
+ tables, `*Delete` events map to the `deleted_at` transition (plus a
44
+ hard-delete variant) and `*Update` events exclude it, so a soft delete
45
+ fires delete triggers exactly once. D1 only.
46
+ - **`handler:` entries** run as application hooks at the audit-wrapper
47
+ write chokepoint (REST CRUD + actions). `before*` hooks are synchronous
48
+ and can mutate the payload or throw to reject — the write never executes
49
+ and the request gets `TRIGGER_REJECTED` (422); audit fields are
50
+ re-stamped after hooks and cannot be forged. `after*` hooks run once per
51
+ returned row and are **awaited** — a throw surfaces as
52
+ `TRIGGER_AFTER_FAILED` (500) with `details.committed: true` since the
53
+ write already persisted. Handlers get `{ table, op, values|row, ctx, db,
54
+ env }`; the `db` is audit-wrapped at cascade depth + 1, so hook writes
55
+ stamp audit fields, emit live-view deltas, and fire nested triggers,
56
+ bounded by a depth cap of 5. Each table's drizzle object is auto-imported
57
+ into the generated registry under its authored name, and handler imports
58
+ are usage-filtered and hoisted.
59
+
60
+ The compile output includes a lowering/coverage report and fail-closed
61
+ warnings: `handler:` triggers do **not** fire for queue handlers, cron, or
62
+ raw SQL — guards that must hold universally should use `sql:` +
63
+ `RAISE(ABORT)`. `async: true` (queue-dispatched after-hooks) and
64
+ `withOld: true` (previous-row access) are reserved and rejected at compile
65
+ time until they ship.
66
+
67
+ Also in this change:
68
+
69
+ - New `trigger` error layer with `TRIGGER_REJECTED` / `TRIGGER_AFTER_FAILED`
70
+ codes in the generated error catalog, OpenAPI spec, and SDK types.
71
+ - Parser: function-valued properties in `defineTable`/`feature` configs now
72
+ parse as compile-time source carriers instead of failing the whole config
73
+ with "no dynamic expressions" — unblocks trigger handlers (and
74
+ function-form `access:` / custom masks) through the CLI source path.
75
+ - Fixed a column-injection bug where a comment merely mentioning a column
76
+ name (e.g. `"deleted_at"` in a docblock) suppressed audit/soft-delete
77
+ column injection for the table.
78
+ - Fixed a silent no-op: a project declaring `services/queues/*.ts` handlers
79
+ without embeddings or `additionalQueues` deployed a wired `queue` export
80
+ with no `[[queues.consumers]]` to feed it — the handlers were dead code.
81
+ The primary queue (and its typed env binding) is now emitted for
82
+ handlers-only projects, with a compile notice that Cloudflare Queues
83
+ requires the paid Workers plan. Queue emission remains strictly opt-in by
84
+ usage: projects with no queue-backed features (embeddings, queue
85
+ handlers, `additionalQueues`, webhooks) emit no queue configuration and
86
+ deploy on the free plan.
3
87
  ## v0.47.0 — June 11, 2026
4
88
 
5
89
  ### Breaking: zero-false-positive analyzer checks are now compile errors
@@ -0,0 +1,62 @@
1
+ # Encryption
2
+
3
+ Mark a text column `.encrypted()` and Quickback envelope-encrypts it at rest with a **per-organization key**:
4
+
5
+ ```typescript
6
+ export default feature('guests', {
7
+ columns: {
8
+ id: q.id(),
9
+ organizationId: q.scope('organization'), // required — keys are per-org
10
+ name: q.text().required(),
11
+ emergencyContact: q.text().encrypted(),
12
+ dietaryNotes: q.text().encrypted(),
13
+ },
14
+ read: { access: { roles: ['member+'] } },
15
+ create: { access: { roles: ['member+'] } },
16
+ });
17
+ ```
18
+
19
+ That one modifier changes what a database breach means: a leaked D1 backup, export, or stolen database token yields only ciphertext for those columns. The keys live separately, wrapped under a worker secret the database never sees.
20
+
21
+ ## What the compiler generates
22
+
23
+ - **`org_data_keys`** — one row per organization holding a random 256-bit data key (DEK), stored **wrapped** under the `ENCRYPTION_KEK` worker secret. Created lazily on the org's first encrypted write.
24
+ - **Write path** — every write (CRUD routes, batch routes, and `db.insert`/`db.update` inside your actions) flows through the same chokepoint, which AES-256-GCM-encrypts the column before anything else sees it. Audit snapshots, webhook payloads, and realtime deltas therefore carry ciphertext by construction.
25
+ - **Read path** — generated routes decrypt behind the firewall and then apply masking, so authorized callers see plaintext and everyone else sees the redaction — never ciphertext.
26
+ - **`ctx.crypto`** — explicit `await ctx.crypto.decrypt(value)` / `ctx.crypto.encrypt(value)` for action code that processes the field server-side (building a manifest, sending an email). Scoped to the caller's active organization.
27
+ - **Boot guard** — a project with encrypted columns refuses to serve without `ENCRYPTION_KEK` (503 `MISSING_ENV`), instead of silently storing plaintext.
28
+
29
+ Values at rest look like `qbenc:1:<keyVersion>:<iv>:<ciphertext>` — the prefix makes accidental plaintext detectable, and the embedded key version supports rotation with lazy re-encryption on write.
30
+
31
+ ## Setup
32
+
33
+ Scaffolded projects already have a generated `ENCRYPTION_KEK` in `.dev.vars`, so local dev works with zero setup. For production:
34
+
35
+ ```bash
36
+ openssl rand -hex 32 | wrangler secret put ENCRYPTION_KEK
37
+ ```
38
+
39
+ ## Rules the compiler enforces
40
+
41
+ Ciphertext cannot be queried, so encrypted columns are **excluded from every query surface at compile time** — these are errors, not warnings:
42
+
43
+ - No `.filterable()` / `.searchable()`, and never listed in a view's `query.{searchable,filterable,sortable}`
44
+ - No `.unique()` (AES-GCM randomizes ciphertext per write), no primary keys, no `.references()`, no `q.scope()` columns, no defaults (a SQL default would bypass the encrypting chokepoint)
45
+ - Never an `embeddings.fields` source (embedding a value ships its plaintext to the model)
46
+ - The table must carry a `q.scope('organization')` column — keys are per-organization
47
+ - Text-shaped columns only (v1)
48
+
49
+ 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
+ ## Per-organization keys: blast radius and crypto-shredding
52
+
53
+ Each organization's data is encrypted under its own DEK, so one compromised key never exposes another tenant. Deleting an org's `org_data_keys` row makes every encrypted value it ever wrote **permanently unreadable** — the cleanest possible GDPR-erasure and offboarding story.
54
+
55
+ ## What this tier does and doesn't claim
56
+
57
+ The envelope tier protects against **storage compromise**: backups, exports, dashboard access, leaked database tokens, SQL injection, and insiders with database read access all get ciphertext. The server *can* decrypt — that's the point; your actions still process the field. It does not protect against full Worker compromise (the sealed/E2EE tier in the encryption roadmap addresses that — see `apps/compiler/research/encryption-vault-spec.md`).
58
+
59
+ Two practical notes:
60
+
61
+ - **Action responses**: rows returned from `db.insert(...).returning()` inside your own actions contain ciphertext — decrypt explicitly with `ctx.crypto.decrypt()` if your action returns the field. Generated CRUD routes handle this automatically.
62
+ - **No server-side equality lookups** on encrypted values (blind indexes are a roadmap item). If you need to filter by it, it probably shouldn't be encrypted — or it needs a separate non-sensitive derived column.