feat(stack): adapter package split — foundation + plan (#627)#630
Conversation
Foundation for splitting the Supabase and Drizzle integrations into their own packages (#627). When the adapters leave this package they can no longer reach core internals via `@/` imports across the package boundary, so the exact symbols they consume — logger, AuditConfig, the v3 column model + DATE_LIKE_CASTS, the domain registry, matchNeedleError, and the model→composite helpers — are re-exported here from one narrow, versioned entry point rather than leaking six internal module paths. Not a general-purpose public API; the seam between core and first-party adapters. Verified: builds, and all re-exported values resolve from the built entry. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…set (#627) Captures the verified import surface, the expose-vs-relocate decision (defaulted to the single adapter-kit subpath), the file inventory, phased move steps, and the verification checklist. The mechanical move is staged for an attended session. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
🦋 Changeset detectedLatest commit: 053041c The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The main-merge floated @biomejs/biome to ^2.5.2 but biome.json's $schema still pinned 2.4.15, so biome rejected the config (deserialize error) and fell back to defaults — failing `code:check` across the branch. Match the schema to the CLI. Also sort the adapter-kit re-exports (biome 2.5.2 organizeImports). Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…into feat/split-adapter-packages
Moves packages/stack/src/supabase into the new package; rewrites its `@/` imports to `@cipherstash/stack` public subpaths + `@cipherstash/stack/adapter-kit`. Drops `./supabase` from stack's exports/typesVersions/tsup entry and tsconfig path; repoints the shared vitest alias. Updates examples/basic and removes the stale test-kit tsconfig path. Tests move in the next commit. Both packages build (JS + DTS). Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
Moves the 11 supabase* unit suites + the 2 test helpers (supabase-mock, postgrest-wire) into the new package; rewrites @/ imports (including vi.mock and dynamic import() targets) to relative ../src paths and @cipherstash/stack public subpaths; repoints the v3 matrix catalog to @cipherstash/test-kit/catalog. Adds fast-check + the @/ / wasm-inline aliases the source-resolved stack needs. stack-supabase: 442 unit tests + type tests green. stack: 1172 pass (only the pre-existing DATABASE_URL live suite fails locally). Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…627) Moves src/drizzle (v2 → package root) and src/eql/v3/drizzle (v3 → ./v3) into the new package; rewrites @/ imports to @cipherstash/stack public subpaths + adapter-kit. Drops ./drizzle and ./eql/v3/drizzle from stack. Moves the drizzle unit + type suites; relocates the shared needle-for helper into @cipherstash/test-kit (used by both a stack test and the drizzle suite). Adds the @/* → stack source mapping to the adapter/test-kit tsconfigs (source- resolved stack needs its own internal alias) and the missing stack subpath aliases (types/errors/identity) to vitest.shared for value imports like queryTypes. Green: stack-drizzle 356 unit + type tests; stack-supabase 442; stack 812 (only the pre-existing DATABASE_URL live suite fails locally). All three build (JS+DTS); biome code:check passes. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…k chain Moving needle-for into test-kit subjected it to test-kit's strict `tsc -p` (stricter than stack's scoped typecheck, which never checked this file). Import matchNeedleError directly from @/schema/match-defaults instead of via @cipherstash/stack/adapter-kit — the latter re-exports encryption/helpers, pulling jsonb.ts's pre-existing loose types into the graph. Also guard the `.match` index access, which strict tsc rejects on the domain-index union. Fixes the Run Tests (Node 22/24) job. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
Moves the shared integration harness (global-setup, no-skips-reporter, clerk
helper) into @cipherstash/test-kit/src/integration, so both adapter packages share
one copy. Relocates the Supabase integration suite (+ pgrest/v3-envelope helpers)
into stack-supabase/integration, and the Drizzle suites + the Clerk-federated
lock-context suite into stack-drizzle/integration, each with a vitest config
wiring the test-kit harness. stack keeps the adapter-agnostic shared/ suites and
the model-path identity/matrix-identity suite, repointed at the test-kit harness.
Rewires integration-{supabase,drizzle}.yml to run each package's test:integration
plus stack's shared/(+identity) suites, and updates their path triggers to the new
packages. Scopes each adapter package's vitest typecheck to a tsconfig.typecheck.json
(.test-d.ts only) so the intentionally loose .test.ts/integration files — now
precisely typed via the @/* mapping — don't fail the type gate.
Verified locally: all three packages build (JS+DTS), unit + type tests green,
code:check green, frozen-lockfile clean; integration suites resolve their imports
(reach requireIntegrationEnv). Integration execution itself runs in CI (needs
creds/DB/PostgREST).
Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…tack The relocated lock-context integration suite imported it from @cipherstash/auth, which stack-drizzle doesn't depend on directly (CI: "Cannot find package '@cipherstash/auth'"). @cipherstash/stack re-exports it, and stack is already a dependency — resolves through stack's own module context. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…lias clerk-provider.test.ts (a stack unit test) imported the clerk helper from ../integration/helpers/clerk, which moved to @cipherstash/test-kit; repoint it to @cipherstash/test-kit/integration-clerk. Also move that alias ahead of the bare @cipherstash/test-kit entry in vitest.shared so Vite's prefix match resolves the subpath (it was ordered after, so it never matched). Fixes the Run Tests (Node 22/24) job. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
There was a problem hiding this comment.
Pull request overview
Establishes the initial “core ↔ adapter” seam (@cipherstash/stack/adapter-kit) and scaffolds the extraction of the Supabase and Drizzle integrations into standalone packages (@cipherstash/stack-supabase, @cipherstash/stack-drizzle), with updated integration test harness wiring and a written execution plan for #627.
Changes:
- Add
@cipherstash/stack/adapter-kitas a narrow re-export surface for first-party adapter packages. - Introduce new workspace packages
stack-supabaseandstack-drizzle(including unit + integration test wiring) and update CI workflows to run their integration suites. - Centralize integration-suite harness pieces in
@cipherstash/test-kit/src/integration(global setup + no-skips reporter) and update Vitest aliasing accordingly.
Reviewed changes
Copilot reviewed 83 out of 92 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vitest.shared.ts | Add aliases for new adapter packages and @cipherstash/stack/adapter-kit, plus integration-clerk export. |
| pnpm-lock.yaml | Add new workspace packages and dependencies (stack-supabase/stack-drizzle; test-kit clerk dep). |
| packages/test-kit/tsconfig.json | Update TS path mapping to include @cipherstash/stack/adapter-kit and drop stack supabase mapping. |
| packages/test-kit/src/needle-for.ts | Adjust match-index extraction to handle matrices without match. |
| packages/test-kit/src/integration/no-skips-reporter.ts | Add Vitest reporter to fail integration runs when any test is skipped. |
| packages/test-kit/src/integration/global-setup.ts | Switch integration global setup import to local index export. |
| packages/test-kit/src/integration/clerk.ts | Add Clerk M2M JWT provider helper for federation tests. |
| packages/test-kit/src/index.ts | Export needleFor from test-kit entry. |
| packages/test-kit/package.json | Add ./integration-clerk export and add @clerk/backend dev dependency (private pkg). |
| packages/stack/tsup.config.ts | Add adapter-kit entry; remove drizzle/supabase build entries. |
| packages/stack/tsconfig.json | Add integration-clerk path mapping; remove stack supabase path mapping. |
| packages/stack/src/adapter-kit.ts | New adapter-kit barrel exporting the “core ↔ adapter” seam symbols. |
| packages/stack/package.json | Add ./adapter-kit export/typesVersions; remove drizzle/supabase/v3-drizzle subpath exports. |
| packages/stack/integration/vitest.config.ts | Point integration globalSetup + no-skips reporter at test-kit integration utilities. |
| packages/stack/integration/identity/matrix-identity.integration.test.ts | Use @cipherstash/test-kit/integration-clerk instead of stack-local helper. |
| packages/stack/tests/v3-matrix/needle-for.test.ts | Use needleFor from @cipherstash/test-kit. |
| packages/stack/tests/clerk-provider.test.ts | Use clerkJwtProvider from @cipherstash/test-kit/integration-clerk. |
| packages/stack-supabase/vitest.config.ts | Add unit-test Vitest config for new stack-supabase package (source aliasing). |
| packages/stack-supabase/tsup.config.ts | Add tsup build config for stack-supabase. |
| packages/stack-supabase/tsconfig.typecheck.json | Add typecheck-only tsconfig for stack-supabase. |
| packages/stack-supabase/tsconfig.json | Add TS config + paths for stack-supabase, including stack subpaths and adapter-kit. |
| packages/stack-supabase/src/verify.ts | Repoint domain registry import through adapter-kit. |
| packages/stack-supabase/src/types.ts | Repoint stack internal imports to public stack subpaths + adapter-kit. |
| packages/stack-supabase/src/schema-builder.ts | Repoint v3 domain/column imports to stack public subpaths + adapter-kit. |
| packages/stack-supabase/src/query-builder.ts | Repoint helpers/audit/logger/types imports to adapter-kit + stack public subpaths. |
| packages/stack-supabase/src/query-builder-v3.ts | Repoint v3 column model/casts/logger imports to adapter-kit + stack public subpaths. |
| packages/stack-supabase/src/introspect.ts | Repoint domain registry import through adapter-kit. |
| packages/stack-supabase/src/index.ts | Switch public entry to import from @cipherstash/stack and document new package import. |
| packages/stack-supabase/src/helpers.ts | Repoint schema/types imports to stack public subpaths. |
| packages/stack-supabase/package.json | New published package manifest for @cipherstash/stack-supabase. |
| packages/stack-supabase/integration/wire.integration.test.ts | Repoint integration test imports to stack public subpaths + package-local sources/helpers. |
| packages/stack-supabase/integration/vitest.config.ts | New integration Vitest config, using shared test-kit harness and source aliasing. |
| packages/stack-supabase/integration/select-alias.integration.test.ts | Repoint integration test imports to new package entry. |
| packages/stack-supabase/integration/introspect.integration.test.ts | Repoint integration test imports to adapter-kit + package-local sources. |
| packages/stack-supabase/integration/helpers/v3-envelope.ts | Add helper for synthetic v3 storage/query envelopes used by PostgREST suite. |
| packages/stack-supabase/integration/helpers/pgrest.ts | Add real PostgREST client + schema-reload helper for live integration suite. |
| packages/stack-supabase/integration/grants.integration.test.ts | Adjust CLI grants import path for new package location. |
| packages/stack-supabase/integration/families.integration.test.ts | Add catalog-driven per-family integration suite driver for Supabase adapter. |
| packages/stack-supabase/integration/adapter.ts | Add integration adapter wiring for Supabase v3 suites. |
| packages/stack-supabase/tests/supabase.test.ts | Repoint unit test imports to new stack-supabase entry + stack public subpaths. |
| packages/stack-supabase/tests/supabase-verify.test.ts | Repoint unit test imports to package-local verify/introspect. |
| packages/stack-supabase/tests/supabase-v3.test-d.ts | Repoint type tests to stack public subpaths + package-local entry. |
| packages/stack-supabase/tests/supabase-v3-wire.test.ts | Repoint wire tests to stack public subpaths + package-local v3 query builder. |
| packages/stack-supabase/tests/supabase-v3-select-star.test.ts | Repoint select-star tests to stack public subpaths + package-local v3 query builder. |
| packages/stack-supabase/tests/supabase-v3-matrix.test.ts | Repoint matrix tests to @cipherstash/test-kit/catalog + package-local v3 query builder. |
| packages/stack-supabase/tests/supabase-v3-factory.test.ts | Repoint factory tests and mocks to package-local sources and stack public subpaths. |
| packages/stack-supabase/tests/supabase-v3-builder.test.ts | Repoint builder tests to package-local entry/query builder + stack public subpaths. |
| packages/stack-supabase/tests/supabase-schema-builder.test.ts | Repoint schema-builder tests to package-local introspect/schema-builder. |
| packages/stack-supabase/tests/supabase-introspect.test.ts | Repoint introspection tests to package-local introspect module. |
| packages/stack-supabase/tests/supabase-helpers.test.ts | Repoint helper tests to package-local helpers/types. |
| packages/stack-supabase/tests/helpers/supabase-mock.ts | Repoint EncryptionClient type import to stack public subpath. |
| packages/stack-supabase/tests/helpers/postgrest-wire.ts | Repoint SupabaseQueryBuilder type import to package-local types. |
| packages/stack-drizzle/vitest.config.ts | Add unit-test Vitest config for new stack-drizzle package. |
| packages/stack-drizzle/tsup.config.ts | Add tsup build config for stack-drizzle (including ./v3 entry). |
| packages/stack-drizzle/tsconfig.typecheck.json | Add typecheck-only tsconfig for stack-drizzle. |
| packages/stack-drizzle/tsconfig.json | Add TS config + paths for stack-drizzle, including stack subpaths and adapter-kit. |
| packages/stack-drizzle/src/v3/types.ts | Repoint v3 types import to @cipherstash/stack/eql/v3. |
| packages/stack-drizzle/src/v3/sql-dialect.ts | Add v3 SQL dialect helper (function schema constant + operator helpers). |
| packages/stack-drizzle/src/v3/schema-extraction.ts | Repoint v3 schema extraction to stack public eql/v3 entry. |
| packages/stack-drizzle/src/v3/operators.ts | Repoint v3 operator types/imports to stack public subpaths + adapter-kit; tighten BulkEncryptedData typing. |
| packages/stack-drizzle/src/v3/index.ts | New barrel export for @cipherstash/stack-drizzle/v3. |
| packages/stack-drizzle/src/v3/column.ts | Repoint v3 column factories/codecs to stack public eql/v3 + types. |
| packages/stack-drizzle/src/v3/codec.ts | Repoint Encrypted type import to stack public types. |
| packages/stack-drizzle/src/schema-extraction.ts | Repoint v2 schema extraction imports to stack public schema entry. |
| packages/stack-drizzle/src/operators.ts | Repoint v2 operator imports to stack public subpaths. |
| packages/stack-drizzle/src/index.ts | Repoint v2 exports/docs to new package name. |
| packages/stack-drizzle/package.json | New published package manifest for @cipherstash/stack-drizzle (with ./v3 subpath). |
| packages/stack-drizzle/integration/vitest.config.ts | New integration Vitest config, using shared test-kit harness and source aliasing. |
| packages/stack-drizzle/integration/relational.integration.test.ts | Repoint integration test imports to stack public v3 + package-local v3 drizzle entry. |
| packages/stack-drizzle/integration/null-persistence.integration.test.ts | Repoint integration test imports to stack public v3 + package-local v3 drizzle entry. |
| packages/stack-drizzle/integration/lock-context.integration.test.ts | Repoint integration test imports to stack exports + test-kit clerk provider + package-local v3 drizzle entry. |
| packages/stack-drizzle/integration/json-contains.integration.test.ts | Repoint integration test imports to stack public eql/v3 + package-local v3 drizzle entry. |
| packages/stack-drizzle/integration/families.integration.test.ts | Add catalog-driven per-family integration suite driver for Drizzle adapter. |
| packages/stack-drizzle/integration/adapter.ts | Add integration adapter wiring for Drizzle v3 suites. |
| packages/stack-drizzle/tests/v3/types.test.ts | Repoint unit tests to stack public eql/v3 + package-local v3 modules. |
| packages/stack-drizzle/tests/v3/types.test-d.ts | Repoint type tests to stack public types + package-local v3 entry. |
| packages/stack-drizzle/tests/v3/sql-dialect.test.ts | Repoint tests to package-local v3 sql-dialect module. |
| packages/stack-drizzle/tests/v3/schema-extraction.test.ts | Repoint tests to stack public eql/v3 + package-local v3 extraction/types. |
| packages/stack-drizzle/tests/v3/operators.test.ts | Repoint tests to test-kit catalog/needleFor + package-local v3 operator modules. |
| packages/stack-drizzle/tests/v3/operators.test-d.ts | Repoint type tests to stack public subpaths + package-local v3 entry. |
| packages/stack-drizzle/tests/v3/exports.test.ts | Repoint barrel export test to package-local v3 index. |
| packages/stack-drizzle/tests/v3/column.test.ts | Repoint tests to stack public eql/v3 + test-kit catalog + package-local v3 column. |
| packages/stack-drizzle/tests/v3/codec.test.ts | Repoint tests to package-local v3 codec. |
| packages/stack-drizzle/tests/v3/bigint.test.ts | Repoint tests to package-local v3 operators/types/column. |
| packages/stack-drizzle/tests/drizzle-operators-jsonb.test.ts | Repoint v2 drizzle operator tests to package-local index + stack public encryption type. |
| packages/stack-drizzle/tests/drizzle-operators-bigint.test.ts | Repoint v2 drizzle operator tests to package-local index + stack public encryption type. |
| examples/basic/src/lib/supabase/encrypted.ts | Update Supabase adapter import to @cipherstash/stack-supabase. |
| examples/basic/package.json | Add workspace dependency on @cipherstash/stack-supabase. |
| docs/plans/2026-07-13-adapter-package-split.md | Add execution plan and decision record for #627 split. |
| .github/workflows/integration-supabase.yml | Run Supabase adapter suites from @cipherstash/stack-supabase and limit stack to shared core suites. |
| .github/workflows/integration-drizzle.yml | Run Drizzle adapter suites from @cipherstash/stack-drizzle and limit stack to shared+identity suites. |
| .changeset/stack-adapter-kit.md | Add changeset for new @cipherstash/stack/adapter-kit subpath. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The gate ran only `fta src/eql/v3` in stack, so relocating the Drizzle v3 code out to stack-drizzle silently dropped it from coverage — and the v2 adapter monoliths (supabase query-builder.ts, drizzle operators.ts) were never gated at all. Adds `analyze:complexity` to both new packages and runs all three from fta-v3.yml (one step each, so a failure names the package), triggered on the new package paths. Caps are ratchets at each package's current worst file: stack 69 (columns.ts 68.46), stack-drizzle 89 (operators.ts 88.70), stack-supabase 91 (query-builder.ts 90.41). Lower a cap as a file is refactored below the next threshold; the two v2 monoliths are the debt to whittle toward stack's 69. Kept the job name "Analyze v3 complexity" so any required-check config still matches. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…apter split
- skills/stash-{drizzle,supabase,encryption}: import from @cipherstash/stack-drizzle
(+/v3) and @cipherstash/stack-supabase, installed alongside @cipherstash/stack;
corrected the "included in @cipherstash/stack" framing to separate first-party
packages.
- docs/reference/supabase-sdk.md + packages/stack/README.md: new package paths;
README's subpath-export table now lists the adapters as separate packages, not
stack subpaths.
- AGENTS.md: dropped the three removed subpaths from the export list, added the
two packages to Repository Layout, updated the integrations section.
- SECURITY.md: added both packages; scoped stack's description.
- examples/basic: import + deps updated.
- Changesets: @cipherstash/stack minor (breaking subpath removal + adapter-kit),
the two new packages at first release, and a stash patch for the bundled skills.
Historical design docs under docs/superpowers/specs and the separate
@cipherstash/drizzle (protect-based) package are intentionally left unchanged.
Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…r split Copilot flagged remaining @cipherstash/stack/drizzle references outside the docs: - CLI `init` scaffolding (utils.ts) generates user Drizzle schema files — now imports from @cipherstash/stack-drizzle, not the removed @cipherstash/stack/drizzle subpath. `encrypt/context.ts`'s optional runtime import updated to match. - packages/bench: drizzle bench/test/setup import @cipherstash/stack-drizzle; added it as a workspace dependency, and the bench CI job now builds it alongside @cipherstash/stack (the db-only smoke doesn't need it, but the full bench does). - examples/basic already updated in the prior commit. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
Correctness / packaging: 1. CLI `install-deps` now installs the integration's adapter package (@cipherstash/stack-drizzle / -supabase / prisma-next), not just @cipherstash/stack — a Drizzle `stash init` was scaffolding an import of a package it never installed. 2. Fix the missed rewrite in stack-supabase/integration/helpers/pgrest.ts (`@/supabase/types` → `../../src/types`, a deleted path). 3-4. Drop the spurious required `@cipherstash/protect-ffi` peer from both new packages (never imported in drizzle; type-only in supabase) — kept as devDep; avoids unmet-peer warnings + version conflict on stack's next ffi bump. 5. Remove the now-dead `drizzle-orm`/`@supabase/supabase-js`/`pg` peers + peerDependenciesMeta from `@cipherstash/stack` and the inert tsup `external`. 6. Add README.md to both new packages (they list it in `files`). 7. Guard `encryptedSupabaseV3(url, key)`'s dynamic `@supabase/supabase-js` import with the same friendly-message remap as the `pg` (`loadPg`) path. Efficiency / altitude / cleanup: 8. Document that the second per-job integration vitest run's EQL install self- skips via `isInstalled` (fast no-op, not a re-apply). 9. Document why test-kit's needle-for imports `matchNeedleError` via `@/` rather than the adapter-kit barrel (avoids dragging the encryption/helpers chain into test-kit's strict tsc). 10. De-duplicate the vitest configs: a shared `stackSourceAlias` (the `@/` + wasm stubs) in vitest.shared, and shared `integrationHarness`/`integrationTestDefaults` in @cipherstash/test-kit, so the five near-identical configs stop drifting; removed the redundant per-config adapter-kit override + its false comment. Verified: all three adapter/core packages + cli build (JS+DTS), unit + type tests green, fta gates pass, code:check + frozen-lockfile clean, integration configs load (reach requireIntegrationEnv), and full `tsc` over the packages no longer flags pgrest.ts or the vitest configs. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
- stack-drizzle/stack-supabase package.json: drop EQL from the descriptions (say "searchable field-level encryption"), remove the `eql` keyword, and add `encryption`, `searchable-encryption`, and `security` keywords. - stack-drizzle README: lead with EQL v3 (with an insert/query/decrypt money-shot), mark v2 as legacy, and link full docs to cipherstash.com/docs/integrations/drizzle. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
…mple
Reads as encryptedTypes.TextSearch('email') / encryptedTypes.IntegerOrd('age'),
making the schema clearer at a glance (review feedback on #630).
Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
Groundwork for #627 — splitting the Supabase and Drizzle integrations into their
own packages (
@cipherstash/stack-supabase,@cipherstash/stack-drizzle),following the
@cipherstash/prisma-nextprecedent.Draft on purpose. This lands the foundation and the plan; the mechanical
~35-file move is staged for an attended session (see below).
What's here (built, green)
@cipherstash/stack/adapter-kit— the enabling support surface. When theadapters leave this package they can no longer reach core internals via
@/imports across the boundary, so this single narrow subpath re-exports exactly
the symbols they consume (logger,
AuditConfig, the v3 column model +DATE_LIKE_CASTS, the domain registry,matchNeedleError, themodel→composite helpers). Documented as the core↔adapter seam, not
general-purpose public API. Verified: builds, and every re-exported value
resolves from the built entry.
docs/plans/2026-07-13-adapter-package-split.md— the execution plan:verified import surface (every
@/…the adapters use and where it moves), thefile inventory, phased steps, and a verification checklist.
The design call for you (the plan flagged this as "decide before coding")
I defaulted to expose one
adapter-kitsubpath rather than leak six internalmodule paths or relocate pieces to other packages — the smallest, most reversible
option. Two findings shrank the surface: the internal
@/typessymbols theadapters need are already in the public
./types, andAnyEncryptedV3Columnis already in
./eql/v3, so neither needs new surface.Approve the
adapter-kitapproach, or prefer relocation (e.g.logger→@cipherstash/utils)? Either way the staged move is mechanical.Why I stopped short of the full move
It's ~35 files across a package boundary (3 src dirs, ~24 unit tests, ~9
integration suites, build/export wiring, docs, changesets). Each import rewrite
and test move is a live breakage point — the kind of thing to run attended so
failures surface immediately, not overnight. The design decision and the
foundation (the genuinely hard/opinionated parts) are done and proven; the move
is tedious-but-low-decision once the seam is approved.
Refs #627.
https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w