You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): stash init --drizzle installs EQL v3, not v2
The Drizzle init flow pinned `eqlVersion: '2'` when calling `installCommand`,
because `eql install --drizzle` — the only migration-generating install path at
the time — was v2-only and rejects `--drizzle` under the v3 default.
That made `stash init --drizzle` the single flow that provisions a v2 database.
A bare `stash eql install`, and init for every other integration, already
default to v3 (`resolveEqlVersion`, registry `default: '3'`). So every new
Drizzle customer was silently added to the v2 install base the team plans to
retire.
It was also internally inconsistent: init copies the `stash-drizzle` skill into
the same project, and that skill documents the v3 surface
(`@cipherstash/stack-drizzle/v3`, `types.*` domains, `EncryptionV3`,
`public.eql_v3_*` column types). The user's agent would author v3 code against
the v2 database init had just provisioned.
`stash eql migration --drizzle` (#691) closes the gap that forced the pin: v3
SQL, still migration-first. Init's Drizzle flow now routes through it, so the
install keeps landing in the project's Drizzle migration history while emitting
v3. The generated migration also carries the `cs_migrations` tracking schema, so
one `drizzle-kit migrate` covers everything `stash encrypt …` needs.
`eql install`'s config/client scaffolding isn't part of `eql migration`, so the
branch does it directly (`offerStashConfig({ ensure: true })` +
`ensureEncryptionClient`) to keep init's contract identical — without it, init
would finish with no `stash.config.ts` and every downstream command would
dead-end (#581).
A missing or misconfigured `drizzle-kit` now degrades to "EQL not installed"
with a pointer to `stash eql migration --drizzle`, rather than the old v2
path's `process.exit(1)` mid-init.
Also:
- `eqlMigrationCommand` gains `embedded` to suppress its intro/outro and
`printNextSteps()` when run as an init step, so the user doesn't get two
competing "what next" blocks.
- `eql install --drizzle`'s rejection message now points at the v3 alternative
instead of only suggesting `--eql-version 2`.
- Updated `skills/stash-cli` and `skills/stash-drizzle`, which both documented
the v2 pin as current behaviour.
// `--drizzle` has a v3 answer now (`stash eql migration --drizzle`, #691),
745
+
// so point there rather than at `--eql-version 2` — steering users to v2
746
+
// is how new projects ended up on the legacy generation.
747
+
constv3Alternative=
748
+
v2OnlyFlag==='--drizzle'
749
+
? ' For a v3 install as a Drizzle migration, use `stash eql migration --drizzle`.'
750
+
: ''
744
751
returnoptions.eqlVersion==='3'
745
-
? `\`--eql-version 3\` does not support \`${v2OnlyFlag}\` yet — v3 currently installs via the direct path only.`
746
-
: `\`${v2OnlyFlag}\` requires EQL v2. Re-run with \`--eql-version 2 ${v2OnlyFlag}\` (v3 is the default and installs via the direct path only).`
752
+
? `\`--eql-version 3\` does not support \`${v2OnlyFlag}\` yet — v3 currently installs via the direct path only.${v3Alternative}`
753
+
: `\`${v2OnlyFlag}\` requires EQL v2. Re-run with \`--eql-version 2 ${v2OnlyFlag}\` (v3 is the default and installs via the direct path only).${v3Alternative}`
Copy file name to clipboardExpand all lines: skills/stash-cli/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,7 +223,7 @@ Seven mechanical steps, no agent handoff. It prompts only when it can't pick a s
223
223
3.**Resolve proxy choice** — CipherStash Proxy or direct SDK access (the default). Stored as `usesProxy` in `context.json`; this is what decides whether `db push` is part of your flow at all. Set by `--proxy` / `--no-proxy`; non-TTY without a flag defaults to SDK.
224
224
4.**Build schema** — auto-detects Drizzle (`drizzle.config.*`, `drizzle-orm`/`drizzle-kit`), Supabase (from the `DATABASE_URL` host), and Prisma Next. Writes a placeholder encryption client; prompts only if a file already exists there.
225
225
5.**Install dependencies** — one combined prompt for `@cipherstash/stack` and `stash`. Skipped when both are present.
226
-
6.**Install EQL** — runs `eql install` against the resolved database. Skipped when EQL is already installed.
226
+
6.**Install EQL** — always EQL v3. **Drizzle** projects generate a v3 install migration (the same output as `eql migration --drizzle`, including the `cs_migrations` tracking schema) so the install lands in your migration history — apply it with `drizzle-kit migrate`; requires `drizzle-kit` to be installed and configured. **Prisma Next** is skipped (it installs EQL via `prisma-next migration apply`). Everything else runs `eql install`directly against the resolved database, and is skipped when EQL is already installed.
227
227
7.**Gather context** — detects available coding agents and writes `.cipherstash/context.json`.
0 commit comments