feat: decouple the core from Rudder (only runtime dep is zod)#6
Merged
Conversation
- zod-to-json-schema uses Zod 4 native z.toJSONSchema directly; drop the
@rudderjs/json-schema dependency
- demote @rudderjs/console to an optional peer (only /doctor + the
make:agent scaffolder use it)
- @rudderjs/core (/server) and @rudderjs/orm (*-orm stores) stay optional
peers behind their opt-in subpaths
- re-enable typecheck + test in CI (revert the build-only stopgap); all
996 tests pass standalone
- core dependencies are now { zod } only; a non-Rudder app installs and
uses the SDK with zero @rudderjs/* packages
Closes #3.
suleimansh
added a commit
that referenced
this pull request
Jun 25, 2026
Bump + CHANGELOG for the Rudder-decoupling (PR #6). Manual changeset version since the repo has no release bot yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3 (Phase 2).
TL;DR
@gemstack/ai-sdk's only required runtime dependency is nowzod. Every@rudderjs/*touchpoint is an optional peer behind an opt-in subpath, so a non-Rudder app installs and uses the SDK with zero@rudderjs/*packages.What I found first
The package already built, typechecked, and passed all 996 tests standalone before this PR. The original Phase 2 premise ("the test suite pulls cache/storage/broadcast/queue/etc.") was a misread: those were comments, not imports. The only genuine couplings were four files.
Changes
src/zod-to-json-schema.ts): use Zod 4's nativez.toJSONSchema(schema, { io })directly (strip the$schemakey, keep the open-object fallback). Removes the@rudderjs/json-schemadependency.@rudderjs/console: demoted from a hard dependency to an optional peer. Only/doctor(a value import) and/commands/make-agent(a type-only import) use it; both are opt-in subpaths.@rudderjs/core(/serverprovider) and@rudderjs/orm(the*-ormstores) were already optional peers behind opt-in subpaths; left as-is. The neutral storage contracts (UserMemory/ConversationStore/BudgetStorage) already ship in-memory defaults.typecheck+test(reverts the ci: scope to build-only until Phase 2 lands #5 build-only stopgap).0.2.0(0.x: the dependency-surface change lives in the minor slot).Verification
pnpm build/pnpm typecheck/pnpm testall green standalone; 996/996 tests pass after the zod-native swap.dependencies:{ zod }. All peers (console/core/orm/mcp-sdk/react) optional.