Skip to content

chore(deps): drop unused @anthropic-ai/sdk dependency#13

Merged
RapierCraft merged 1 commit into
RapierCraft:mainfrom
sergei-aronsen:chore/drop-unused-anthropic-dep
May 16, 2026
Merged

chore(deps): drop unused @anthropic-ai/sdk dependency#13
RapierCraft merged 1 commit into
RapierCraft:mainfrom
sergei-aronsen:chore/drop-unused-anthropic-dep

Conversation

@sergei-aronsen
Copy link
Copy Markdown

Summary

`grep -rn anthropic src/ tests/` returns zero hits — the package is in `package.json` but never imported anywhere in the codebase. Likely a leftover from an earlier exploration of routing through the Anthropic API directly (the MCP server now interacts with Perplexity's Comet via CDP, not Anthropic).

Removing it:

  • Cuts ~30 MB of transitive packages (`@types/node`, `node-fetch`, `agentkeepalive`, `formdata-node`, ...) from every install of the package.
  • Speeds up `npm ci` in CI noticeably.
  • Trims supply-chain attack surface — fewer transitives to monitor.

Notes on the lockfile

This PR removes the entry from `package.json` and the matching top-level entries from `package-lock.json`. Some orphan transitive entries remain (`abort-controller`, `node-fetch`, `agentkeepalive`, `form-data-encoder`, `formdata-node`, `humanize-ms`, `@types/node-fetch`) and will be flushed on the next `npm install` locally.

Happy to either:

  • let the lockfile be regenerated on merge, or
  • push a follow-up commit removing the orphans explicitly — reviewer's preference.

Test plan

  • `npm install` resolves cleanly (regenerates lock if desired)
  • `npm ci` still works (orphans cause no failure with lockfileVersion 3)
  • `npm run build` succeeds
  • `npm run test:unit` passes

Related

Last of three small PRs from an audit pass:

  • security hardening of `Runtime.evaluate` / PowerShell interpolation (separate)
  • correctness fixes (separate)
  • this PR (cleanup)

🤖 Generated with Claude Code

`grep -rn anthropic src/ tests/` returns zero hits — the package is in
`package.json` but never imported anywhere in the codebase. It was
likely a leftover from an earlier exploration of routing through the
Anthropic API directly (the MCP server now interacts with Perplexity's
Comet via CDP, not Anthropic).

Removing it:

* Cuts ~30 MB of transitive packages (`@types/node`, `node-fetch`,
  `agentkeepalive`, `formdata-node`, …) from every `npm install` of
  the package.
* Speeds up `npm ci` in CI noticeably.
* Trims supply-chain attack surface — fewer transitives to keep an
  eye on.

This commit removes the entry from `package.json` and the matching
top-level entries from `package-lock.json`. Some orphan transitive
entries (`abort-controller`, `node-fetch`, `agentkeepalive`,
`form-data-encoder`, `formdata-node`, `humanize-ms`, and
`@types/node-fetch`) remain in the lockfile and will be flushed on the
next `npm install`. Happy to either:

* let the lockfile be regenerated on merge, or
* push a follow-up commit removing the orphans explicitly — reviewer's
  preference.

If a future feature needs the Anthropic SDK, it can be added back at
that point.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Owner

@RapierCraft RapierCraft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: PR #13 — Drop unused @anthropic-ai/sdk dependency

Reviewed commit: ea73940

Verification

I grepped the entire codebase (src/, tests/, and all *.ts/*.js/*.mjs/*.cjs files) for any reference to anthropic or @anthropic-ai/sdk. Zero hits outside of package.json and package-lock.json. The dependency is confirmed unused.

Diff Analysis

The PR correctly removes:

  • The @anthropic-ai/sdk entry from package.json dependencies
  • The resolved package entry and its transitive deps (@types/node, undici-types) from package-lock.json

Minor Note: Orphan Transitive Dependencies

As the author acknowledged, ~7 orphan transitive packages (abort-controller, node-fetch, agentkeepalive, form-data-encoder, formdata-node, humanize-ms, @types/node-fetch) remain in the lockfile. These will be cleaned up on the next npm install. This is not blocking — npm ci with lockfileVersion 3 handles orphans gracefully.

Recommendation: Either regenerate the lockfile in this PR (preferred for cleanliness) or accept as-is and let it flush naturally. Both are fine.

Verdict: APPROVE

Clean removal of a dead dependency. No code references exist. Reduces install size and supply-chain surface. Safe to merge.


Automated code review — dependency usage verified via full codebase grep.

@RapierCraft RapierCraft merged commit 85885c7 into RapierCraft:main May 16, 2026
1 check passed
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.

2 participants