Skip to content

Commit 467a385

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/prisma-next-eql-v3
2 parents a0f5ee0 + d5b2d5b commit 467a385

162 files changed

Lines changed: 8842 additions & 8372 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
'stash': minor
3+
---
4+
5+
Add anonymous, opt-out usage analytics to the `stash` CLI, plus a
6+
`stash telemetry [status|enable|disable]` command to manage it.
7+
8+
Only coarse events are collected — command name, CLI version, OS/arch, Node
9+
version, success/failure, duration, and a coarse caller class (e.g.
10+
`claude-code`, `cursor`, `interactive`) derived from environment markers so we
11+
can gauge agent- vs human-driven usage. Events carry a random install
12+
identifier (a locally generated UUID, not derived from any machine or user
13+
attribute) used only to de-duplicate events in aggregate. Plaintext, schema,
14+
table/column names,
15+
connection strings, argument values, and any session/trace identifier are never
16+
collected — enforced by a property-key allowlist at the emitter boundary plus
17+
closed-vocabulary coercion of every argv- or error-derived value (unrecognised
18+
commands, subcommands, and error class names all collapse to `<other>`). A
19+
one-time notice is shown on first run, and nothing is sent on that run.
20+
21+
Telemetry is off by default in CI and can be disabled with `DO_NOT_TRACK=1`
22+
(the cross-tool standard), `STASH_TELEMETRY_DISABLED=1`, or
23+
`stash telemetry disable` (persisted to `~/.cipherstash/telemetry.json`).
24+
25+
Events are sent via a first-party proxy and never block or slow the CLI. The
26+
feature ships dormant — no events are sent until a PostHog project key is
27+
embedded at release. Updates the `stash-cli` skill to document the command and
28+
opt-out controls.

.changeset/config.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
"$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json",
33
"changelog": "@changesets/cli/changelog",
44
"commit": false,
5-
"fixed": [],
5+
"fixed": [
6+
[
7+
"stash",
8+
"@cipherstash/stack",
9+
"@cipherstash/stack-drizzle",
10+
"@cipherstash/stack-supabase",
11+
"@cipherstash/prisma-next",
12+
"@cipherstash/wizard"
13+
]
14+
],
615
"linked": [],
716
"access": "restricted",
817
"baseBranch": "main",

.changeset/eql-v3-json-selector.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
'@cipherstash/stack-drizzle': minor
3+
'stash': patch
4+
---
5+
6+
Add EQL v3 JSON **selector-with-constraint** querying to the Drizzle integration
7+
(#623). `ops.selector(col, '$.path')` returns comparison methods bound to a
8+
JSONPath into a `types.Json` column — `eq`/`ne`/`gt`/`gte`/`lt`/`lte` — emitting
9+
`col->'<selector>' <op> <value>` over the encrypted document. Its unique power
10+
over `contains` is **ordering at a path** (`col->'$.age' > 21`), which
11+
containment cannot express.
12+
13+
Complements the existing `contains` (JSONB `@>`) containment operator. Core
14+
`@cipherstash/stack` needs no change — the selector hash and comparison entry are
15+
produced by `encryptQuery`/`encrypt` on the existing `types.Json` surface. v1
16+
supports dot-notation object paths; array-index/wildcard paths are rejected with
17+
a clear error. The Supabase adapter is tracked separately.
18+
19+
The right-hand comparison operand is currently a storage-encrypted needle (its
20+
ste_vec entry carries the ordering term), pending a ciphertext-free ordering
21+
query needle from protect-ffi (cipherstash/protectjs-ffi#137); until then the
22+
value's ciphertext appears in the WHERE clause.
23+
24+
The bundled `stash-encryption` and `stash-drizzle` skills document the new
25+
`ops.selector(...)` surface (they previously said JSONPath selector queries were
26+
not yet implemented).

.changeset/eql-v3-sole-docs.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'stash': patch
3+
'@cipherstash/stack': patch
4+
---
5+
6+
Docs: EQL v3 is now the sole documented approach. The `stash-encryption`,
7+
`stash-drizzle`, and `stash-supabase` skills and the `@cipherstash/stack`
8+
README teach only the v3 typed surface (`EncryptionV3`, `types.*` concrete
9+
domains, `@cipherstash/stack-drizzle/v3`, `encryptedSupabaseV3`); EQL v2
10+
shrinks to one short Legacy section per document. Two explicit exceptions are
11+
called out: DynamoDB still requires the v2 schema surface (#657), and the
12+
encrypt rollout tooling (`stash encrypt backfill`/`cutover`,
13+
`@cipherstash/migrate`) currently targets v2 columns (#648) — its guidance is
14+
kept under a version callout. Also corrects the legacy `@cipherstash/drizzle`
15+
README's pointer to the removed `@cipherstash/stack/drizzle` subpath (now the
16+
separate `@cipherstash/stack-drizzle` package).
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
'stash': patch
3+
---
4+
5+
`stash init` now pins the packages it installs (`@cipherstash/stack`, the
6+
integration adapter, and `stash` itself) to the exact versions this CLI
7+
release was built alongside, instead of installing bare package names that
8+
resolve through npm dist-tags (#661). During a pre-release window dist-tags
9+
lag or point at placeholders, so an unpinned `init` could silently deliver a
10+
different release than the CLI driving the setup — stale `@cipherstash/stack`,
11+
or an empty placeholder adapter — breaking `/v3` imports out of the box. The
12+
versions are embedded at build time from the release train itself
13+
(`src/release-train.ts`, the single source both the build and the runtime
14+
check against), so they can never disagree with what was published together.
15+
16+
Init also now surfaces **version skew** on already-installed packages —
17+
unconditionally, before any prompt or early exit, including when the install
18+
is declined or partially fails. Interactively it offers to align the skewed
19+
packages in the same confirm as the missing installs (keeping `stash` a dev
20+
dependency); non-interactively it never mutates an existing install — it
21+
warns and prints the exact align commands. A package whose manifest exists
22+
but can't be read (an aborted install) is reported as skew, not treated as
23+
matching. All other install guidance is pinned the same way: the
24+
missing-package hints, `.cipherstash/context.json`'s `installCommand`, the
25+
`install-eql` manual note, the native-module recovery hint (previously
26+
`stash@latest`), and the `stash wizard` one-shot spawn (previously an
27+
unpinned `npx @cipherstash/wizard`). The `stash-cli` skill documents the
28+
behaviour, and the other bundled skills' manual install commands now carry a
29+
verify-what-resolved note.

.changeset/pre.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"@cipherstash/supabase-worker-example": "0.0.0",
99
"@cipherstash/bench": "0.0.4",
1010
"stash": "0.17.1",
11-
"@cipherstash/drizzle": "3.0.3",
1211
"@cipherstash/migrate": "0.2.0",
1312
"@cipherstash/nextjs": "4.1.1",
1413
"@cipherstash/prisma-next": "0.3.2",
@@ -24,6 +23,7 @@
2423
"changesets": [
2524
"adapter-package-split",
2625
"adapter-split-skills",
26+
"cli-anonymous-telemetry",
2727
"cli-eql-v3-single-bundle",
2828
"eql-v3-adapter-type-robustness",
2929
"eql-v3-bigint-domains",
@@ -34,19 +34,26 @@
3434
"eql-v3-drizzle",
3535
"eql-v3-ffi-0-28-concrete-types",
3636
"eql-v3-ga-rebaseline",
37+
"eql-v3-json-selector",
3738
"eql-v3-json-skills",
3839
"eql-v3-json",
3940
"eql-v3-public-domains",
4041
"eql-v3-rename-contains-to-matches",
42+
"eql-v3-sole-docs",
4143
"eql-v3-supabase-adapter",
4244
"eql-v3-text-search",
4345
"eql-v3-typed-client",
4446
"eql-v3-typed-schema",
4547
"eql-v3-wasm-inline",
48+
"init-pins-runtime-versions",
4649
"prisma-next-0-14",
50+
"prisma-next-joins-release-train",
51+
"release-train-coupling",
52+
"remove-legacy-drizzle-package",
4753
"remove-secrets-leftovers",
4854
"rename-db-install-to-eql-install",
4955
"schema-stevec-standard-pin",
56+
"skills-identity-docs-refresh",
5057
"stack-1-0-0-rc",
5158
"stack-adapter-kit",
5259
"stash-cli-eql-v3-default",
@@ -58,7 +65,12 @@
5865
"supabase-in-list-operands",
5966
"supabase-is-null-operands",
6067
"supabase-or-string-parser",
68+
"supabase-v3-json-querying",
6169
"supabase-v3-order-by-ope-term",
62-
"wizard-allow-env-templates"
70+
"v3-supabase-needle-lockcontext-errors",
71+
"wasm-encrypt-query",
72+
"wizard-allow-env-templates",
73+
"wizard-analytics-privacy",
74+
"wizard-joins-release-train"
6375
]
6476
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@cipherstash/prisma-next': patch
3+
---
4+
5+
`@cipherstash/prisma-next` now versions in lockstep with the Stack release
6+
train (`stash`, `@cipherstash/stack`, and the other adapters) via a Changesets
7+
`fixed` group — `stash init` installs it pinned by exact version, so the two
8+
must always release together. This moves the package from its previous `0.4.x`
9+
line onto the shared train version; no API changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
'stash': patch
3+
---
4+
5+
Two guards for the release-train version embed (#661 follow-up):
6+
7+
**Direction-aware version skew.** `stash init` now distinguishes an installed
8+
package that is *behind* this CLI release (offered alignment / the pinned
9+
install command, as before) from one that is *newer* than the release expects.
10+
A newer install no longer produces a downgrade command — init prints the exact
11+
`stash` update command instead (release-train lockstep guarantees that version
12+
exists), and when missing packages are about to be installed alongside newer
13+
ones it says the pairing may not match and to update `stash` first. Unreadable
14+
or malformed manifest versions always count as behind (a broken install should
15+
be offered the reinstall fix, never "looks newer, leave it").
16+
17+
**Version lockstep.** The release-train packages (`stash`,
18+
`@cipherstash/stack`, `@cipherstash/stack-drizzle`,
19+
`@cipherstash/stack-supabase`, `@cipherstash/prisma-next`,
20+
`@cipherstash/wizard`) are now a Changesets `fixed` group: a release of any of
21+
them republishes all of them at the same version, so the CLI's embedded
22+
version map can never go stale against the packages it pins (previously a
23+
runtime-package-only release would have left the published CLI embedding —
24+
and recommending — outdated versions). A test now asserts the fixed group
25+
stays exactly equal to the release train.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'stash': patch
3+
'@cipherstash/stack-drizzle': patch
4+
---
5+
6+
The legacy `@cipherstash/drizzle` package (the `@cipherstash/protect`-based
7+
Drizzle integration) is removed from the repository and the release train —
8+
`@cipherstash/protect` is sunsetting at Stack 1.0, and the package's successor
9+
is `@cipherstash/stack-drizzle`. Already-published versions remain installable
10+
from npm (deprecated, pointing here); the git history preserves the source for
11+
any emergency maintenance. The `stash-drizzle` skill and the
12+
`@cipherstash/stack-drizzle` README now state the deprecation explicitly so
13+
nobody (human or agent) installs the legacy package by mistake.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
'stash': patch
3+
'@cipherstash/stack': patch
4+
---
5+
6+
Docs: stop teaching the deprecated `LockContext.identify()` as the primary
7+
identity-aware-encryption path (#591). The `stash-encryption` and `stash-supabase`
8+
skills and the `@cipherstash/stack` README now lead with the current pattern —
9+
authenticate the client with `OidcFederationStrategy`, then bind the claim per
10+
operation with `.withLockContext({ identityClaim })` — and demote
11+
`LockContext.identify()` to a clearly-marked deprecated note (per-operation CTS
12+
tokens were removed in protect-ffi 0.25). Skills ship in the `stash` tarball, so
13+
this keeps the bundled guidance correct for the 1.0 surface.

0 commit comments

Comments
 (0)