feat(server): rip out @anthropic-ai/claude-agent-sdk entirely#3629
Conversation
|
Warning Review limit reached
Your plan currently allows 2 reviews/hour. Refill in 21 minutes and 17 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Review — ? finding(s)
protoLabs Code Review Report
No findings recorded. |
Minor bump — the first release since the proto SDK cutover, beads integration, and ~64 commits of fixes / cleanup. Per `npm run release:prepare` (auto-classified from conventional-commit prefixes). Highlights since v0.107.1: - proto SDK is now the primary driver — `@anthropic-ai/claude-agent-sdk` ripped out (#3625-#3629). ProtoProvider wraps `@protolabsai/sdk`, routes through the LiteLLM gateway, default model `protolabs/smart`. - beads (`br`) tracker replaces the in-app TODO surface (#3639) — single source of truth between UI and crew, JSONL is git-friendly. - create-new-project picker trimmed: ai-agent-app, design-system, and browser-extension starters removed (#3638) — 53k LoC deleted. - Fault tolerance round (today): #3635/#3613/#3568/#3594/#3596/#3483 closed — error reasons now reach `feature.statusChangeReason`, merged-PR reconciler has a branch-fallback path, escalation router no longer self-loops, KnowledgeIngestion and LabsService have path containment, branch-name unsafe-char merge gate hard-fails cleanly. - Significant dead-code purge across UI + server (#3577-#3591) — dead routes, services, hooks, view components. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Why
PR 4 — final step of the namesake SDK cutover. Removes
@anthropic-ai/claude-agent-sdkfrom the codebase entirely. The runtime path already routed through@protolabsai/sdk/anthropic-compat(PR #3625, #3626, #3628); this PR closes the loop on the type-level dependency and the inert verify-claude-auth endpoint.Changes
apps/server/src/lib/sdk-options.ts— inline the agent-SDK type shapes locally instead of importing from@anthropic-ai/claude-agent-sdk. The 1000-line option-builder module now owns the type contract it actually emits (Options,HookCallback,HookCallbackResult,HookCallbackMatcher,PreToolUseHookInput,PostToolUseHookInput,HookEventInput). Field set tracks what we actually populate. The compat layer's runtime translation absorbs any structural differences (proto SDK accepts the wider shapes — seeproto-provider.tsadapters).Also drops the
pathToClaudeCodeExecutablefield fromgetBaseOptions()— proto SDK bundles its own CLI binary; there's no path to pin, and the compat layer's runtime ignores the field anyway. The constantCLAUDE_CODE_EXECUTABLEand itsfileURLToPathimport go with it.apps/server/src/routes/setup/routes/verify-claude-auth.ts— deleted. The endpoint spawned the Claude Agent SDK to verify direct-Anthropic auth (api key + OAuth flows). Under gateway-first routing (#3619 et al.) there's no Claude auth to verify; the endpoint has been inert for weeks. UI callers (4 sites insetup-view/andsettings-view/api-keys/) will receive a 404 and surface their existing error path — those surfaces are being removed in the upcoming protoCLI first-class provider work, so a stub here would be wasted code.apps/server/src/routes/setup/index.ts— drop thecreateVerifyClaudeAuthHandlerimport and its router registration. Comment explains the deletion.apps/server/package.json—@anthropic-ai/claude-agent-sdkremoved from dependencies.@anthropic-ai/sdk(the bare Anthropic API SDK) stays — different package, used for the analytics path, not the agent loop.Validation
npm run typecheckclean across all 21 workspacesvitest runin apps/server: 3431 passed, 23 skipped, 0 failedgrep -rn "@anthropic-ai/claude-agent-sdk" apps/server/src libs/returns only comments referring to the historical migration — no live importsStill-open follow-ups
@protolabsai/sdk/anthropic-compattypes so consumers don't need any casts. Today's casts inclaude-provider.ts(mcpServers, outputFormat) and the local type shims insdk-options.tscan collapse into a singleimport type { ... } from '@protolabsai/sdk/anthropic-compat'after the upstream widens.setup-view/steps/claude-setup-step.tsx,setup-view/steps/providers-setup-step.tsx, andsettings-view/api-keys/hooks/use-api-key-management.tsstill callapi.setup.verifyClaudeAuth. Those are getting reworked as part of the protoCLI first-class provider work (separate PR): a new protoCLI onboarding step + settings tab + autodetect + the Claude-specific surfaces retire alongside.After this lands
The codename "Automaker" stays internal, but the agent SDK underneath is now fully
@protolabsai/sdk. Every model dispatch throughClaudeProviderorProtoProviderruns proto's CLI under the hood, routed via the gateway. Anthropic SDK dep is gone.