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

@usewax/sdk

v0.3.0

Published

Wax SDK — typed TypeScript client for the Wax agent API and browser session.

Readme

@usewax/sdk

Wax SDK — typed TypeScript client for the Wax agent API and browser voice sessions.

React shim — useConversation compatibility

Swap your ElevenLabs import in one line:

// Before:
import { useConversation } from "@elevenlabs/react";

// After:
import { useConversation } from "@usewax/sdk/react";

The hook signature and return shape are compatible. No other code changes required for the core session lifecycle.

Gap table

| EL method | Wax behavior | Notes | |---|---|---| | startSession(opts?) | Implemented | Same signature. Requires credential or tokenProvider. | | endSession() | Implemented | Graceful teardown, resets state. | | sendContextualUpdate(text) | Implemented | Sends wax.context_update over the data channel; agent injects the text as a one-shot system message on its next turn (0.3.0+). | | setDynamicVariable(name, value) | Implemented (Wax extension) | Wax-specific. Mid-session mutation of {{var_name}} template values; agent re-renders system prompt on next turn (0.3.0+). | | setMicMuted(muted) | Implemented (Wax extension) | Wax-specific. Runtime mic enable/disable. Pairs with micMuted option in useConversation. (0.3.0+). | | status | Implemented | Returns "disconnected" \| "connecting" \| "connected" \| "error". | | isSpeaking | Implemented | True while agent TTS is active. | | mode | Implemented | Returns "speaking" \| "listening". | | message | Implemented | Carries error message string when status is "error". | | sendUserMessage(text) | No-op with console.warn | Wax does not yet expose text injection on WaxSession. | | sendUserActivity() | No-op with console.warn | Inactivity timer reset not yet surfaced on WaxSession. | | sendFeedback(like) | No-op with console.warn | Feedback channel not yet available. | | sendMCPToolApprovalResult(id, approved) | No-op with console.warn | MCP tool approval not yet surfaced in this shim. | | sendMultimodalMessage(opts) | Not returned | Wax does not have a multimodal text+image channel. | | uploadFile(file) | Not returned | File upload not available in Wax. | | changeInputDevice(cfg) | Not returned | Device selection not surfaced in WaxSession. | | changeOutputDevice(cfg) | Not returned | Device selection not surfaced in WaxSession. | | setVolume(opts) | Not returned | Volume control not surfaced in WaxSession. | | setMuted(isMuted) | Mapped to setMicMuted | Use setMicMuted (Wax extension; same semantics). | | isMuted | Not returned | Mic state not tracked in this shim — read via your own React state alongside setMicMuted. | | canSendFeedback | Not returned | Feedback gating not applicable. | | getInputByteFrequencyData() | Not returned | Audio analysis not surfaced in WaxSession. | | getOutputByteFrequencyData() | Not returned | Audio analysis not surfaced in WaxSession. | | getInputVolume() | Not returned | Audio analysis not surfaced in WaxSession. | | getOutputVolume() | Not returned | Audio analysis not surfaced in WaxSession. | | getId() | Not returned | Use WaxSession.sessionId directly if needed. |

Unsupported methods that appear in the return shape emit a single console.warn on first call and then silently no-op. They will not throw.

Not-returned methods are absent from the return object entirely. TypeScript will catch any call-sites that used them at compile time.

Callback mapping

| EL callback prop | Wax equivalent | |---|---| | onConnect | WaxCallbacks.onConnect | | onDisconnect | WaxCallbacks.onDisconnect | | onError | WaxCallbacks.onError — shape changed to { message, category } | | onMessage | WaxCallbacks.onTextMessage — shape changed to { role, text } | | onModeChange | WaxCallbacks.onModeChange — mapped to "speaking" \| "listening" |

Installation

bun add @usewax/sdk
# or
npm install @usewax/sdk

Quick Start

import { WaxSession } from "@usewax/sdk";

const session = new WaxSession({
  credential: await fetchCredential(), // JWT from POST /v1/agents/{id}/sessions/credentials
  agentId: "agent-uuid",
  callbacks: {
    onConnect: () => console.log("connected"),
    onTextMessage: (msg) => console.log(msg.role, msg.text),
  },
});

await session.start();
// ... later ...
await session.end();

Package Exports

| Import path | Contents | |-------------|----------| | @usewax/sdk | Main entry — AgentsClient, WaxSession, all types | | @usewax/sdk/react | useConversation hook (ElevenLabs-compatible shim) | | @usewax/sdk/tools | ClientToolRegistry, register, attach, attachWith | | @usewax/sdk/tools/signing | DispatchEnvelope (runtime:'client'), verify, freshNonce | | @usewax/sdk/session | WaxSession, WaxCallbacks, reconnect constants |

Documentation

See docs/sdk/ in the Wax monorepo for full API reference and migration guides.