Skip to content

Commit 587be2e

Browse files
authored
docs(stack-encrypt): record the plan builder in the changelog
The plan module is new public API: the chain on the cipher, saved fields and one-value plans, `all`, `PlanError` (in the new `Error::Plan`), and the fixes from review (a passthrough name under no label, `&String` contexts and keyset names, a chain checked before its keyset loads). `Error` is `#[non_exhaustive]` and `StackCipher` had no `encrypt`, `query` or `open` before, so nothing here changes an existing public name.
1 parent 90b25fd commit 587be2e

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

‎packages/stack-encrypt/CHANGELOG.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5353
(`dynamic::admits`) and a value of another kind, on encrypt and on
5454
decrypt. `dynamic::read` reads a query value as a kind;
5555
`FieldPlan::with_type` and `field_type` set and read the declaration.
56+
- The `plan` module, the chained plan builder: `cipher.encrypt(&value)`,
57+
`cipher.query(&value)` and `cipher.open(record)`, each finished by
58+
`.await`, with `.keyset(..)` and `.extend(..)` on every chain. A value is
59+
sealed under a context as one tree (`.context(c)`), with indexes beside
60+
it (`.with(indexes)`), or field by field (`.fields()` then `encrypt`,
61+
`encrypt_index`, `index`, `passthrough` and `identity`). Every chain lowers
62+
to the combinators in `target` and produces the same bytes they do.
63+
- Saved plans: `Plan::context(c).fields()...build()` (a fields plan,
64+
`Plan<S, K>`) and `Plan::context(c).with(indexes).build()` (a one-value
65+
plan, `ValuePlan<S, X>`), run with `.using(&plan)` over a value, a slice
66+
or a `Vec`, queried through `Plan::field(name)` (a `FieldPlan`) or the
67+
`ValuePlan` itself, and opened with `cipher.open(record).using(&plan)`.
68+
`FieldValues` is a fields plan's record; `Fields`, `Field` and
69+
`FieldSchema` describe a value's fields; `FieldKind` says what a field
70+
does.
71+
- `all((..))`: two to four chains settled in one ZeroKMS request per
72+
request kind, under one keyset. Chains from different ciphers are
73+
refused; an opening that names no keyset still reads any keyset.
74+
- `PlanError`, carried in the new `Error::Plan`: every way a plan, or the
75+
value, record or query it runs with, is refused. A chain is checked
76+
(`Operation::check`) before it loads a keyset it names.
77+
- A passthrough field's name may be any text: it is under no label, so
78+
`FieldPlan::label` is `None` for one.
79+
- `IntoLabel` for `&String`, and `KeysetChoice` from a `&String`.
5680

5781
## [0.2.0] - 2026-10-04
5882

0 commit comments

Comments
 (0)