@cipherstash/stack 1.0.0-rc.0 → 1.0.0-rc.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 (40) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/README.md +321 -239
  3. package/dist/adapter-kit.cjs +81 -2
  4. package/dist/adapter-kit.cjs.map +1 -1
  5. package/dist/adapter-kit.d.cts +41 -3
  6. package/dist/adapter-kit.d.ts +41 -3
  7. package/dist/adapter-kit.js +77 -2
  8. package/dist/adapter-kit.js.map +1 -1
  9. package/dist/{chunk-V2Q3NYIH.js → chunk-6SGN52W6.js} +1 -1
  10. package/dist/{chunk-V2Q3NYIH.js.map → chunk-6SGN52W6.js.map} +1 -1
  11. package/dist/{chunk-OFQ555AX.js → chunk-IDKP6ABU.js} +2 -2
  12. package/dist/{chunk-ZTP5QJ27.js → chunk-L7ISHSG7.js} +3 -3
  13. package/dist/{chunk-LBMC4D6D.js → chunk-NVKK7UDN.js} +1 -1
  14. package/dist/chunk-NVKK7UDN.js.map +1 -0
  15. package/dist/{columns-rZc7fQHI.d.ts → columns-0lbT9stl.d.ts} +2 -2
  16. package/dist/{columns-D2_YzrCX.d.cts → columns-Bxv7Oo9o.d.cts} +2 -2
  17. package/dist/encryption/index.cjs.map +1 -1
  18. package/dist/encryption/index.js +3 -3
  19. package/dist/encryption/v3.cjs.map +1 -1
  20. package/dist/encryption/v3.d.cts +2 -2
  21. package/dist/encryption/v3.d.ts +2 -2
  22. package/dist/encryption/v3.js +4 -4
  23. package/dist/eql/v3/index.cjs.map +1 -1
  24. package/dist/eql/v3/index.d.cts +2 -2
  25. package/dist/eql/v3/index.d.ts +2 -2
  26. package/dist/eql/v3/index.js +1 -1
  27. package/dist/errors/index.cjs.map +1 -1
  28. package/dist/errors/index.d.cts +5 -5
  29. package/dist/errors/index.d.ts +5 -5
  30. package/dist/errors/index.js +1 -1
  31. package/dist/identity/index.cjs.map +1 -1
  32. package/dist/identity/index.js +2 -2
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.js +3 -3
  35. package/dist/wasm-inline.d.ts +2 -2
  36. package/dist/wasm-inline.js.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunk-LBMC4D6D.js.map +0 -1
  39. /package/dist/{chunk-OFQ555AX.js.map → chunk-IDKP6ABU.js.map} +0 -0
  40. /package/dist/{chunk-ZTP5QJ27.js.map → chunk-L7ISHSG7.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # @cipherstash/stack
2
2
 
3
+ ## 1.0.0-rc.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 5fe9a2f: Encrypted-JSON querying on the v3 Supabase surface (#650). A `types.Json`
8
+ column now supports exact encrypted containment — `contains(col, subDocument)`
9
+ (ste_vec `@>` via PostgREST `cs`, with the sub-document storage-encrypted
10
+ against the column) — and JSONPath selector predicates: `selectorEq(col, path,
11
+ value)` and `selectorNe(col, path, value)` (dot-notation paths; `ne` includes
12
+ rows where the path is absent, mirroring the Drizzle selector's semantics).
13
+ Raw `.filter(col, 'cs', subDocument)` and `not(col, 'contains', …)` route
14
+ through the same encrypted path. Selector ordering is not expressible over
15
+ PostgREST yet (needs an EQL-bundle overload — see
16
+ cipherstash/encrypt-query-language#407); the Drizzle integration's
17
+ `ops.selector()` covers ordering today.
18
+
19
+ In core, `QueryTypesForColumn` gains the `searchableJson` arm (a `types.Json`
20
+ column no longer resolves to `never`, so typed adapter key sets can include
21
+ it), and the JSONPath selector-path helpers the Drizzle adapter introduced in
22
+ #651 moved to `@cipherstash/stack/adapter-kit` so both adapters share one
23
+ validation surface (`@cipherstash/stack-drizzle` re-exports them unchanged).
24
+
25
+ The bundled `stash-supabase` and `stash-encryption` skills are updated to
26
+ document the new querying surface (including the array-leaf and SQL-NULL
27
+ semantics, and the operand-exposure caveat) — skills ship inside the `stash`
28
+ tarball, hence the patch.
29
+
30
+ ### Patch Changes
31
+
32
+ - e297f64: Docs: EQL v3 is now the sole documented approach. The `stash-encryption`,
33
+ `stash-drizzle`, and `stash-supabase` skills and the `@cipherstash/stack`
34
+ README teach only the v3 typed surface (`EncryptionV3`, `types.*` concrete
35
+ domains, `@cipherstash/stack-drizzle/v3`, `encryptedSupabaseV3`); EQL v2
36
+ shrinks to one short Legacy section per document. Two explicit exceptions are
37
+ called out: DynamoDB still requires the v2 schema surface (#657), and the
38
+ encrypt rollout tooling (`stash encrypt backfill`/`cutover`,
39
+ `@cipherstash/migrate`) currently targets v2 columns (#648) — its guidance is
40
+ kept under a version callout. Also corrects the legacy `@cipherstash/drizzle`
41
+ README's pointer to the removed `@cipherstash/stack/drizzle` subpath (now the
42
+ separate `@cipherstash/stack-drizzle` package).
43
+ - 40ab142: Docs: stop teaching the deprecated `LockContext.identify()` as the primary
44
+ identity-aware-encryption path (#591). The `stash-encryption` and `stash-supabase`
45
+ skills and the `@cipherstash/stack` README now lead with the current pattern —
46
+ authenticate the client with `OidcFederationStrategy`, then bind the claim per
47
+ operation with `.withLockContext({ identityClaim })` — and demote
48
+ `LockContext.identify()` to a clearly-marked deprecated note (per-operation CTS
49
+ tokens were removed in protect-ffi 0.25). Skills ship in the `stash` tarball, so
50
+ this keeps the bundled guidance correct for the 1.0 surface.
51
+ - 7b53141: Three correctness fixes surfaced while documenting the v3 surface:
52
+
53
+ - **Supabase `matches()` now rejects a short free-text needle.** A needle
54
+ below the tokenizer's `token_length` blooms to zero tokens, so `bloom @> {}`
55
+ matched (and the caller decrypted) every row — a fail-open exposure. The
56
+ guard (`matchNeedleError`) was wired into the Drizzle adapter only; the
57
+ Supabase adapter now applies it at the same term-resolution choke point, so
58
+ both first-party surfaces reject identically. (Authoritative FFI-level backstop
59
+ for the `encryptQuery` paths tracked in cipherstash/protectjs-ffi#138.)
60
+ - **Supabase `.withLockContext()` accepts the plain `{ identityClaim }` form**,
61
+ not only a `LockContext` instance — matching the stack-level operations and
62
+ the documented identity-aware example (widened to `LockContextInput`).
63
+ - **`EncryptionErrorTypes` is now `as const`**, so the `StackError` union
64
+ actually discriminates: `switch (error.type)` narrows and `error.code` is
65
+ reachable on the relevant branches. Without it every `type` was `string` and
66
+ the documented exhaustive error handler did not compile.
67
+
3
68
  ## 1.0.0-rc.0
4
69
 
5
70
  ### Major Changes