npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@interview-sdk/adapter-claude

v0.1.2

Published

Anthropic Claude provider adapter for @interview-sdk/core.

Readme

@interview-sdk/adapter-claude

npm

Anthropic Claude provider adapter for @interview-sdk/core, built on the official @anthropic-ai/sdk (Messages API).

Install

npm install @interview-sdk/core @interview-sdk/adapter-claude

Usage

import { ClaudeAdapter } from '@interview-sdk/adapter-claude';

const adapter = new ClaudeAdapter({ apiKey: process.env.ANTHROPIC_API_KEY });
// <InterviewWidget adapter={adapter} mode="client" ... />
// or: new ServerAnswerProcessor({ questions, rubric, adapter })

(AdapterRegistry from @interview-sdk/core is a separate, optional utility for looking an adapter up by string id at runtime — most apps just pass the adapter directly like above.)

ClaudeAdapter accepts an optional model (defaults to claude-opus-4-8) and an optional pre-configured client — useful for testing or for pointing at Claude Platform on AWS / Bedrock / Vertex / Foundry client classes instead of the first-party client.

Behavior

  • Splits AIMessage[] into Anthropic's system string param and the messages array (user/assistant only) — matches the security model in @interview-sdk/core, where candidate free text always arrives as its own user-role message.
  • Treats a stop_reason: "refusal" (Claude's safety-classifier decline) as an error rather than silently returning empty content.
  • Normalizes every Anthropic SDK exception onto the shared Provider*Error taxonomy exported by @interview-sdk/core (ProviderAuthError, ProviderRateLimitError, ProviderOverloadedError, ProviderConnectionError, ProviderTimeoutError, ProviderContextLengthExceededError, ProviderInvalidRequestError), so withRetry and FailoverAdapter from core work without knowing anything Claude-specific.
  • Context-length overflow is detected heuristically from the error message text, since Anthropic reports it as a plain 400 invalid_request_error with no distinct error type.
  • A deprecated/unknown model id surfaces as Anthropic's 404 NotFoundError and is normalized to ProviderInvalidRequestError — pair this adapter with FailoverAdapter if you want automatic fallback to another provider.

Verified against

@anthropic-ai/[email protected], current as of 2026-07-04 — the Messages API, model catalog, and error taxonomy shift quickly; re-check before assuming this stays accurate for long.