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

@snap-protocol/openclaw-snap-bridge

v0.2.0

Published

OpenClaw plugin that bridges enterprise SSO/LDAP identities to SNAP P2TR addresses and relays IM messages

Readme

@snap-protocol/openclaw-snap-bridge

An OpenClaw plugin that bridges enterprise IM identities (Slack, DingTalk, Teams) to SNAP P2TR addresses via the SNAP Bridge protocol. It handles identity binding, certificate lifecycle, and bidirectional message relay over a single WebSocket connection.

How It Works

Enterprise IM (DingTalk/Slack/Teams)
        │
        ▼
┌─────────────────┐     WebSocket      ┌────────────────────────┐
│  Bridge Server   │◄──────────────────►│  This Plugin (Agent)   │
│  (SNAP Bridge)   │  ca/bind           │  ┌──────────────────┐  │
│                  │  ca/cert_request    │  │ BridgeConnection │  │
│  Routes messages │  message/send      │  │ BindingManager   │  │
│  between IM and  │  message/stream    │  │ CertManager      │  │
│  SNAP agents     │  bridge/send       │  │ InboundRouter    │  │
│                  │  tasks/get|cancel   │  │ ResponseHandler  │  │
└─────────────────┘                     └────────────────────────┘
                                                    │
                                                    ▼
                                               OpenClaw Core

Installation

npm install @snap-protocol/openclaw-snap-bridge

Register the plugin in your OpenClaw configuration:

// ~/.openclaw/openclaw.json (plugins section)
{
  "plugins": {
    "entries": {
      "openclaw-snap-bridge": {
        "config": {
          "bridgeUrl": "wss://bridge.example.com/snap-bridge"
        }
      }
    }
  }
}

Local bridge: If you are running the bridge locally for development, use ws://127.0.0.1:9090 instead. See docs/development.md for the full local development workflow.

Configuration

| Field | Required | Default | Description | |-------|----------|---------|-------------| | bridgeUrl | Yes | — | WebSocket URL of the SNAP Bridge server | | privateKey | No | auto-generated | 64-character lowercase hex key for BIP-340 Schnorr signing | | privateKeyPath | No | — | Path to key file (takes precedence over privateKey) | | streamingEnabled | No | true | Advertise message/stream capability to the Bridge |

Private key resolution order:

  1. privateKeyPath — reads key from file
  2. privateKey — uses inline value
  3. Neither set — auto-generates and stores at ~/.openclaw/openclaw-snap-bridge/key.hex

Quick Start

Option A: Run the demo (no Bridge Server needed)

The demo starts a local mock Bridge and walks through the full lifecycle:

npx tsx examples/demo.ts

You will see: connection → pairing → certificate issuance → inbound message handling → proactive outbound message. Wait ~45 seconds to observe automatic certificate renewal.

Option B: Connect to a real Bridge Server

  1. Get your Bridge Server URL and a pairing code from your admin
  2. Configure the plugin:
{
  "bridgeUrl": "wss://bridge.example.com/snap-bridge"
}
  1. On first connection, pass the pairing code via the gateway start options. The plugin will:

    • Connect to the Bridge via WebSocket
    • Send ca/bind with the pairing code
    • Receive your identity binding (enterprise user ↔ SNAP address)
    • Request and cache a SNAP-IC certificate (auto-renews at 75% lifetime)
  2. Once paired, the plugin automatically reconnects and re-binds on disconnection.

API Overview

The plugin exposes three adapters to OpenClaw:

Gateway — Manages the WebSocket lifecycle

  • start({ config, pairingCode }) — Connect and pair with Bridge
  • stop() — Disconnect and clean up
  • isConnected() — Connection status

Outbound — Send messages to IM users

  • sendText({ text, target }) — Send a proactive message via bridge/send

Config — Account management

  • listAccountIds() — List bound identities
  • resolveAccount(cfg, accountId) — Get binding details for an identity

Supported Protocol Methods

| Method | Direction | Description | |--------|-----------|-------------| | ca/bind | Agent → Bridge | Pair agent with enterprise identity | | ca/cert_request | Agent → Bridge | Request/renew SNAP-IC certificate | | message/send | Bridge → Agent | Deliver IM message for sync processing | | message/stream | Bridge → Agent | Deliver IM message for streaming response | | bridge/send | Agent → Bridge | Proactive outbound message to IM user | | tasks/get | Bridge → Agent | Query task status | | tasks/cancel | Bridge → Agent | Cancel a running task |

Guide

  • docs/guide.md — Step-by-step walkthrough for end users connecting to a remote Bridge server
  • docs/development.md — Local development setup with a local Bridge server

License

MIT