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

@orchestratexr/conversation-embed

v0.1.4

Published

Embed the OrchestrateXR conversation player and exchange conversation interaction events over postMessage.

Readme

@orchestratexr/conversation-embed

npm version types included license

Host-side SDK for embedding the OrchestrateXR conversation player in an <iframe> and exchanging conversation interaction events with it over postMessage.

📖 Full guide: OrchestrateXR / Interaction Events

Your page can receive what happens in a live conversation — utterances, tool calls, speaking-state changes, perception events — and send commands back into it: respond, echo, interrupt, overwrite/append context, adjust sensitivity, and return tool results.

There is nothing to install on the player side. When the OrchestrateXR player runs inside an iframe it stands up a bridge automatically; this SDK is the matching host-side client.

Install

npm install @orchestratexr/conversation-embed

Or drop it on a page directly:

<script src="https://unpkg.com/@orchestratexr/conversation-embed"></script>
<!-- exposes the global OrchestrateConversationEmbed -->

Quick start

<iframe
  id="player"
  src="https://embed.orchestratexr.com/…your conversation launch url…"
  allow="camera; microphone; autoplay"
></iframe>

<script type="module">
  import { attach } from '@orchestratexr/conversation-embed'

  const embed = attach(document.getElementById('player'), {
    // Recommended in production: pin the player's origin instead of '*'.
    playerOrigin: 'https://embed.orchestratexr.com',
  })

  // The player announces itself once it's live in the iframe.
  embed.on('ready', (info) => {
    console.log('connected to conversation', info.conversation_id)
  })

  // Receive everything the conversation emits.
  embed.on('utterance', (event) => {
    console.log(event.properties.role, event.properties) // full turn text
  })

  // Run a tool the character asked for, then return the result.
  embed.on('tool_call', (event) => {
    const { tool_call_id, name, arguments: args } = event.properties
    const output = runYourTool(name, args)
    embed.toolResult({ toolCallId: tool_call_id, output })
  })

  // Drive the conversation from your UI.
  embed.respond('Tell me about the evacuation route.')
  embed.echo('One moment while I look that up…')
  embed.interrupt()
</script>

Receiving events

on(name, handler) subscribes to a channel. There are three kinds:

| Channel | Fires for | Handler args | | --- | --- | --- | | ready | Player connected (and on every handshake()) | (info) | | interaction | Every interaction event | (event, meta) | | <eventType> | One event type, e.g. utterance, utterance.streaming, tool_call, started_speaking, stopped_speaking, perception_tool_call, perception_analysis | (event, meta) | | lifecycle | Player lifecycle | (msg) | | <lifecycle name> | e.g. replica-joined, conversation-ended | (msg) | | error | A command was rejected | (msg) |

event is the raw interaction-event payload ({ message_type, event_type, conversation_id, properties, … }). The per-type channel name is the event type with the conversation. prefix stripped.

Sending events

| Method | Sends | | --- | --- | | respond(text) | conversation.respond — feed text as if the user spoke it | | echo(text, opts?) | conversation.echo — make the character speak this verbatim | | interrupt() | conversation.interrupt — stop the character talking | | overwriteContext(context) | conversation.overwrite_llm_context | | appendContext(context) | conversation.append_llm_context | | sensitivity({ pause }) / sensitivity({ interrupt }) | conversation.sensitivity (send exactly one) | | toolResult({ toolCallId, output, status? }) | conversation.tool_result | | interaction(eventType, properties?) | any inbound interaction event, by type | | handshake() | re-request ready; returns a Promise<ReadyInfo> |

Security

  • playerOrigin — the origin commands are posted to. Defaults to '*'; set it to the player's origin in production so commands can't be delivered to an unexpected document.
  • allowedOrigins — an optional allowlist; when set, events from any other origin are ignored.
  • The SDK only accepts messages from the iframe you attached to, so unrelated frames on your page can't spoof the player.

TypeScript

Types ship with the package (index.d.ts) — no @types install needed. attach(), the ConversationEmbed class, event payloads, and every method are fully typed.

Documentation

Full guide and the interaction-event reference: OrchestrateXR / Interaction Events. Issues and questions: github.com/AccessVR/OrchestrateConversationEmbed/issues.

License

MIT © AccessVR LLC d/b/a OrchestrateXR