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

@cloudcorp/widget

v2.36.0

Published

Embeddable voice AI widget — add real-time voice agents to any website. Supports React, Vue, Angular, and Svelte.

Readme

@cloudcorp/widget

Embeddable voice AI widget. Add real-time voice agents to any website with a single script tag or npm import. Supports React, Vue, Angular, and Svelte.

Install

npm install @cloudcorp/widget

Quick Start

Script Tag (CDN)

<script
  src="https://unpkg.com/@cloudcorp/widget/dist/cloudvoice.js"
  data-agent="your-agent-id"
  data-server="https://your-server.com"
></script>

ES Module

import { Widget } from '@cloudcorp/widget'

const widget = new Widget({
  agent: 'your-agent-id',
  server: 'https://your-server.com',
})

widget.on('transcript', ({ role, text }) => {
  console.log(`${role}: ${text}`)
})

Framework Integration

React

import { CloudVoice, useCloudVoice } from '@cloudcorp/widget/react'

// Component
function App() {
  return (
    <CloudVoice
      agent="your-agent-id"
      server="https://your-server.com"
      onTranscript={({ role, text }) => console.log(`${role}: ${text}`)}
      onReady={({ agentName }) => console.log(`Connected to ${agentName}`)}
    />
  )
}

// Hook
function App() {
  const { ready, sendText, close } = useCloudVoice({
    agent: 'your-agent-id',
    server: 'https://your-server.com',
  })

  return <div>{ready ? 'Connected' : 'Connecting...'}</div>
}

Vue

<script setup>
import { CloudVoice, useCloudVoice } from '@cloudcorp/widget/vue'

// Composable
const { ready, sendText, close } = useCloudVoice({
  agent: 'your-agent-id',
  server: 'https://your-server.com',
})
</script>

<template>
  <!-- Or use the component with events -->
  <CloudVoice
    agent="your-agent-id"
    server="https://your-server.com"
    @transcript="({ role, text }) => console.log(`${role}: ${text}`)"
    @ready="({ agentName }) => console.log(`Connected to ${agentName}`)"
  />
</template>

Angular

import { CloudVoiceDirective } from '@cloudcorp/widget/angular'

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [CloudVoiceDirective],
  template: `
    <div
      cloudVoice
      [agent]="'your-agent-id'"
      [server]="'https://your-server.com'"
      (cvTranscript)="onTranscript($event)"
      (cvReady)="onReady($event)"
    ></div>
  `,
})
export class AppComponent {
  onTranscript({ role, text }) {
    console.log(`${role}: ${text}`)
  }
  onReady({ agentName }) {
    console.log(`Connected to ${agentName}`)
  }
}

Svelte

<script>
  import { cloudVoice, createCloudVoice } from '@cloudcorp/widget/svelte'

  // Action
  const params = {
    agent: 'your-agent-id',
    server: 'https://your-server.com',
    onTranscript: ({ role, text }) => console.log(`${role}: ${text}`),
  }

  // Or programmatic
  const { widget, sendText, close } = createCloudVoice({
    agent: 'your-agent-id',
    server: 'https://your-server.com',
  })
</script>

<div use:cloudVoice={params}></div>

Configuration

| Option | Type | Required | Description | |--------|------|----------|-------------| | agent | string | Yes | Agent ID to connect to | | server | string | No | Server URL. Defaults to current page origin | | apiKey | string | No | API key for cross-origin usage | | sessionToken | string | No | One-time session token (alternative to apiKey) | | platform | string | No | Platform identifier. Default: 'widget' | | idleText | string | No | Text shown in idle state | | modes | InteractionMode[] | No | Interaction modes to offer. Default: ['browser'] | | agentPhone | string | No | Phone number for "I'll Call" mode | | whatsappNumber | string | No | WhatsApp number for WhatsApp modes | | requireVerification | 'email' \| 'phone' \| 'both' \| false | No | OTP verification before connecting | | verifyMethod | 'sms' \| 'voice' \| 'whatsapp' | No | How to send verification codes. Default: 'sms' |

Interaction Modes

| Mode | Description | |------|-------------| | browser | Voice conversation directly in the browser | | callMe | Agent calls the user's phone, transcript shows in widget | | illCall | Shows a number to call, transcript shows in widget | | whatsapp | Opens WhatsApp chat, transcript shows in widget | | whatsapp_call | Voice call via WhatsApp number |

<script
  src="https://unpkg.com/@cloudcorp/widget/dist/cloudvoice.js"
  data-agent="your-agent-id"
  data-modes="browser,callMe,whatsapp"
></script>

Events

| Event | Payload | Description | |-------|---------|-------------| | ready | { agentName, version } | Connected to agent | | transcript | { role, text, isFinal } | Speech transcript | | ended | { reason } | Conversation ended | | error | string | Error message | | transfer | { status, reason? } | Human handoff status | | inputRequest | { requestId, fieldName, fieldType, label, ... } | Agent requesting user input |

Methods

| Method | Description | |--------|-------------| | sendText(text) | Send a text message | | close() | End the current session | | destroy() | Remove the widget from the page | | on(event, handler) | Listen for events | | off(event, handler) | Remove event listener |

CDN Data Attributes

All configuration can be set via data-* attributes on the script tag:

<script
  src="https://unpkg.com/@cloudcorp/widget/dist/cloudvoice.js"
  data-agent="your-agent-id"
  data-server="https://your-server.com"
  data-api-key="cv_xxxxx"
  data-modes="browser,callMe,illCall,whatsapp,whatsapp_call"
  data-agent-phone="+1234567890"
  data-whatsapp-number="+1234567890"
  data-require-verification="phone"
  data-verify-method="voice"
  data-idle-text="Hi! How can I help?"
></script>

License

UNLICENSED - proprietary software by CloudCorp