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
{{ message }}
Repository navigation
ai-claude-code and ai-sandbox: add "sideEffects": false so translateSdkStream tree-shakes #2032
Vite 8.0.0 (Rolldown), TanStack Start 1.169, Nitro 3
Describe the bug and the steps to reproduce it
@tanstack/ai and @tanstack/ai-skills set "sideEffects": false in package.json. @tanstack/ai-claude-code and @tanstack/ai-sandbox do not. So a bundler must keep every module that the root entry of @tanstack/ai-claude-code imports, also when the app uses only translateSdkStream.
The server output keeps side-effect imports of @modelcontextprotocol/sdk (types.js plus ajv, about 475 kB) and of hono with @hono/node-server (about 27 kB). They come from @tanstack/ai-sandbox/dist/esm/tool-bridge.js through the root entry of @tanstack/ai-claude-code. No sandbox code is called.
With this Rolldown rule, both imports go away and the build still works:
Expected: "sideEffects": false in both packages, as in @tanstack/ai. A subpath export for the translator, such as @tanstack/ai-claude-code/translate, would also let an app that only translates stream-json skip the required @tanstack/ai-sandbox peer.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
Activity
perf(ai-claude-code): mark package side-effect free so translateSdkSt…