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

@virturing/sdk

v0.5.0

Published

Server-side TypeScript SDK for the Virturing Voice API

Readme

Virturing TypeScript SDK

Server-side SDK for Node.js 18+.

import { Virturing } from "@virturing/sdk";

const voice = new Virturing({ apiKey: process.env.VIRTURING_API_KEY! });
const call = await voice.createCall({
  agent_id: "agent_uuid",
  phone_number_id: "number_uuid",
  to_number: "+94771234567",
  channel: "ai",
  metadata: { employee_id: "EMP-1042", shift: "morning" },
});

Use a dynamic agent when trusted server code creates a one-off task:

const call = await voice.createDynamicCall({
  phone_number_id: "number_uuid", // Or connector_id for your own carrier.
  to_number: "+94771234567",
  dynamic_agent: {
    name: "Attendance confirmation",
    instructions: "Confirm attendance. Never infer an answer the caller did not give.",
    first_message: "Hello, I am calling to confirm your attendance tomorrow.",
    voice_performance_profile: "balanced",
    output_fields: [{
      extractionType: "ai",
      name: "attending",
      description: "Whether the recipient confirms attendance.",
      resultFormat: "boolean",
      exampleOutput: "true",
      required: true,
      confirmation: "explicit",
    }],
  },
  metadata: { employee_id: "EMP-1042" },
}, { idempotencyKey: "attendance-EMP-1042" });

The inline configuration is validated, frozen, and retained with the call for retries and audit. It is not added to the workspace agent list. The same payload can be used in createCallBatch or scheduleCall.

For a monitoring alert, create a one-way alert agent in the portal and send the exact text from trusted server code. Virturing calls through the selected owned number, speaks the message with the alert agent's configured voice, and hangs up:

const alert = await voice.createAlertCall({
  agent_id: "alert_agent_uuid",
  phone_number_id: "number_uuid",
  to_number: "+94771234567",
  message: "Production alert. Checkout latency has exceeded two seconds.",
  metadata: { incident_id: "INC-2042" },
}, { idempotencyKey: "incident-INC-2042" });

Alert calls do not start STT, an LLM, tools, or a conversational workflow. Carrier usage and generated TTS audio are still prepaid and metered.

To keep an existing Twilio number and carrier account, point the number's incoming-call webhook to the connector URL shown in Virturing. Outgoing calls use the same connector directly:

const call = await voice.createTwilioCall({
  connector_id: "connector_uuid",
  agent_id: "agent_uuid",
  to_number: "+94771234567",
  metadata: { customer_ref: "CUST-1042" },
}, { idempotencyKey: "customer-call-CUST-1042" });

Twilio continues to bill the carrier leg; Virturing deducts only metered AI/platform usage from the USD wallet.

To use a Virturing number with your own AI or media server, register a WSS endpoint and start a programmable call:

const { endpoint, signing_secret } = await voice.createMediaEndpoint({
  name: "My voice service",
  url: "wss://voice.example.com/virturing/media",
});
// Store signing_secret once in your server-side secret manager.
await voice.createProgrammableCall({
  phone_number_id: "number_uuid",
  media_endpoint_id: endpoint.id,
  to_number: "+94771234567",
});

verifyMediaStreamSignature authenticates the WSS opening handshake. The stream uses bidirectional PCM16 mono audio at 8 kHz. See docs/programmable-media.md for the complete contract and customer-hosted Python and Node examples.

For OAuth client credentials, initialize with clientId, clientSecret, and optional scopes instead. Tokens are cached and refreshed automatically. createMediaSession returns a short-lived LiveKit participant token for metered web or app voice sessions.

Create calls only from trusted server code. The SDK generates idempotency keys, retries safe requests on temporary failures, applies timeouts, and returns typed API errors. Pass your own idempotencyKey when a business operation already has a stable ID.