Skip to content

fix(deps): align @anthropic-ai/sdk with claude-agent-sdk peer range - #1125

Merged
code-yeongyu merged 5 commits into
mainfrom
fix/anthropic-sdk-peer-alignment
Aug 26, 2026
Merged

fix(deps): align @anthropic-ai/sdk with claude-agent-sdk peer range#1125
code-yeongyu merged 5 commits into
mainfrom
fix/anthropic-sdk-peer-alignment

Conversation

@code-yeongyu

Copy link
Copy Markdown
Owner

Summary

  • Align @anthropic-ai/sdk (0.91.1 -> 0.120.0) with @anthropic-ai/claude-agent-sdk@0.3.241's peer requirement (>=0.93.0), eliminating the incorrect peer dependency warning every bun install printed (user report on Discord).
  • Externalize node:* builtins in the browser-smoke check ONLY when imported from inside @anthropic-ai/sdk: the SDK's >=0.93.0 credentials subsystem uses runtime-guarded dynamic import('node:fs'), which the guardrail should not fail on - while senpi-owned browser code keeps failing loudly (mutation-proven below).

Verification

  • API-compat audit: all imported types/classes present in 0.120.0; additive-only ClientOptions/union widenings; Anthropic.Messages.Tool byte-identical.
  • tsc --noEmit exit 0; packages/ai 2393 passed / 0 failed; packages/coding-agent 8784 passed / 0 failed; full npm run check exit 0 (biome, pinned-deps, ts-imports, shrinkwrap, install-lock, claude-sdk-platform-lock, browser-smoke).
  • Peer warning repro: bun install before = 1 warning, after = 0; npm ls @anthropic-ai/sdk deduped on 0.120.0, no invalid/UNMET.
  • Guardrail mutation proof: a senpi-owned import "node:fs" in packages/ai still fails browser-smoke with exactly that 1 error while the 7 SDK-internal ones stay exempt; reverted clean.
  • Lockfile delta: 0 unrelated version changes; only the SDK hoist + 3 new SDK transitive deps.

@code-yeongyu
code-yeongyu enabled auto-merge August 26, 2026 05:12
@anthropic-ai/claude-agent-sdk@0.3.241 requires @anthropic-ai/sdk
>=0.93.0, but the pin was 0.91.1, so installs warned:

  warn: incorrect peer dependency "@anthropic-ai/sdk@0.91.1"

Bump the pin to 0.120.0 (current latest) across the root override and
every workspace that depends on the SDK.
Regenerated via npm run refresh-lock (lockfile + registry metadata +
shrinkwrap + install-lock), plus the standalone example extension lock.

@anthropic-ai/sdk dedupes to a single root entry; standardwebhooks,
@stablelib/base64 and fast-sha256 are new transitive deps of the SDK.
No other package versions change.
@anthropic-ai/sdk >=0.93.0 ships a Node-only credentials subsystem that
reaches node:fs and node:path via dynamic imports the SDK guards at
runtime. esbuild still hard-errors on the unresolvable builtins when
bundling for the browser, and the claude-agent-sdk peer floor forces
>=0.93.0, so no compliant SDK version passes the check.

Mark node: specifiers external only when the importer lives inside
node_modules/@anthropic-ai/sdk. senpi-owned browser-facing code that
imports a Node builtin still fails the check.
@code-yeongyu
code-yeongyu force-pushed the fix/anthropic-sdk-peer-alignment branch from 7b23635 to 066408d Compare August 26, 2026 05:18
@code-yeongyu
code-yeongyu merged commit 6d80ada into main Aug 26, 2026
17 checks passed
@code-yeongyu
code-yeongyu deleted the fix/anthropic-sdk-peer-alignment branch August 26, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant