Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/ai-sdk-drop-orm-subpaths.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@gemstack/ai-sdk": minor
---

Decouple from `@rudderjs/orm` (epic: framework-agnostic engine).

The ORM-backed store subpaths `@gemstack/ai-sdk/conversation-orm`, `/memory-orm`, `/budget-orm`, and `/memory-embedding` are **removed** from this package. They imported `@rudderjs/orm`, coupling the agnostic engine to the Rudder ORM, so they have moved to the Rudder binding `@rudderjs/ai` under the same subpath names (`@rudderjs/ai/conversation-orm`, etc.). The `@rudderjs/orm` peer dependency is dropped.

**Breaking (0.x):** update imports from `@gemstack/ai-sdk/{conversation-orm,memory-orm,budget-orm,memory-embedding}` to `@rudderjs/ai/{...}`. The relocated implementations are unchanged and still implement the neutral `ConversationStore` / `UserMemory` / `BudgetStorage` contracts, which remain exported from `@gemstack/ai-sdk`. Non-Rudder apps implement those contracts against their own persistence, or use the in-memory defaults.
13 changes: 6 additions & 7 deletions packages/ai-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ pnpm add @aws-sdk/client-bedrock-runtime # AWS Bedrock

## Status

As of `0.2.0` the core stands alone: `@gemstack/ai-sdk`'s only required runtime dependency is `zod`. Every framework integration is an optional, opt-in subpath behind an optional peer dependency:
The core stands alone: `@gemstack/ai-sdk`'s only required runtime dependency is `zod`. Persistence is via **neutral contracts** you implement against your own infrastructure:

- the Rudder `/server` provider (optional peer `@rudderjs/core`)
- the ORM-backed stores `/conversation-orm`, `/memory-orm`, `/budget-orm` (optional peer `@rudderjs/orm`)
- the doctor check + `make:agent` scaffolder (optional peer `@rudderjs/console`)
- `ConversationStore`, `UserMemory`, `BudgetStorage` ship in-memory defaults; bring your own backend by implementing the interface.
- `CacheAdapter` (the suspendable run stores) and `StorageAdapter` (`ImageGenerator`/`AudioGenerator` `.store()`) are caller-supplied — no storage/cache package is bundled.

The neutral storage contracts (`UserMemory`, `ConversationStore`, `BudgetStorage`) ship in-memory defaults, so a non-Rudder app uses the SDK with zero `@rudderjs/*` installed. The version line stays `0.x` while the API settles toward `1.0.0`.
The ORM-backed implementations of those contracts (Prisma/Drizzle/native via `@rudderjs/orm`) are a Rudder binding and live in [`@rudderjs/ai`](https://www.npmjs.com/package/@rudderjs/ai) (`@rudderjs/ai/conversation-orm`, `/memory-orm`, `/budget-orm`, `/memory-embedding`), not here. A few remaining opt-in subpaths still carry optional Rudder peers (`/server` → `@rudderjs/core`; doctor + `make:agent` → `@rudderjs/console`). The version line stays `0.x` while the API settles toward `1.0.0`.

## Subpath exports

Expand All @@ -43,11 +42,11 @@ The neutral storage contracts (`UserMemory`, `ConversationStore`, `BudgetStorage
| `./computer-use` | Computer-use tool + executor |
| `./eval` | Eval framework (`evalSuite`, metrics, reporters) |
| `./gateway` | Gateway helpers |
| `./conversation-orm`, `./memory-orm`, `./budget-orm` | ORM-backed stores (optional `@rudderjs/orm` peer; moving behind the neutral seam) |
| `./memory-embedding` | Embedding-backed user memory |
| `./react` | React bindings |

> **Moved in `0.3.0`:** the MCP bridge (`mcpClientTools` / `mcpServerFromAgent`), previously the `./mcp` subpath, is now its own package, [`@gemstack/ai-mcp`](https://github.com/gemstack-land/gemstack/tree/main/packages/ai-mcp). Update `@gemstack/ai-sdk/mcp` imports to `@gemstack/ai-mcp` and move the `@modelcontextprotocol/sdk` peer there.
>
> **Moved to `@rudderjs/ai`:** the ORM-backed stores (`./conversation-orm`, `./memory-orm`, `./budget-orm`, `./memory-embedding`) coupled the engine to `@rudderjs/orm`, so they now live in [`@rudderjs/ai`](https://www.npmjs.com/package/@rudderjs/ai) under the same subpath names. Update `@gemstack/ai-sdk/conversation-orm` imports to `@rudderjs/ai/conversation-orm` (etc.). They implement the same `ConversationStore` / `UserMemory` / `BudgetStorage` contracts, still exported from here.

## License

Expand Down
23 changes: 1 addition & 22 deletions packages/ai-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,10 @@
"import": "./dist/chat-mentions.js",
"types": "./dist/chat-mentions.d.ts"
},
"./conversation-orm": {
"import": "./dist/conversation-orm/index.js",
"types": "./dist/conversation-orm/index.d.ts"
},
"./gateway": {
"import": "./dist/gateway/index.js",
"types": "./dist/gateway/index.d.ts"
},
"./memory-orm": {
"import": "./dist/memory-orm/index.js",
"types": "./dist/memory-orm/index.d.ts"
},
"./budget-orm": {
"import": "./dist/budget-orm/index.js",
"types": "./dist/budget-orm/index.d.ts"
},
"./memory-embedding": {
"import": "./dist/memory-embedding/index.js",
"types": "./dist/memory-embedding/index.d.ts"
},
"./eval": {
"import": "./dist/eval/index.js",
"types": "./dist/eval/index.d.ts"
Expand All @@ -113,15 +97,14 @@
"dev": "tsc -p tsconfig.build.json --watch",
"typecheck": "tsc --noEmit",
"test": "tsc -p tsconfig.test.json && cd dist-test && node --test",
"clean": "rm -rf dist"
"clean": "rm -rf dist dist-test"
},
"dependencies": {
"zod": "^4.0.0"
},
"peerDependencies": {
"@rudderjs/console": "^1.4.3",
"@rudderjs/core": "^1.13.3",
"@rudderjs/orm": "^1.22.0",
"react": ">=19.2.0"
},
"peerDependenciesMeta": {
Expand All @@ -131,9 +114,6 @@
"@rudderjs/core": {
"optional": true
},
"@rudderjs/orm": {
"optional": true
},
"react": {
"optional": true
}
Expand All @@ -148,7 +128,6 @@
"devDependencies": {
"@rudderjs/console": "^1.4.3",
"@rudderjs/core": "^1.13.3",
"@rudderjs/orm": "^1.22.0",
"@types/node": "^20.0.0",
"@types/react": "^19.2.0",
"react": "^19.2.0",
Expand Down
Loading
Loading