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

@wopr-network/wopr-plugin-p2p

v1.1.0

Published

P2P networking plugin for WOPR with Hyperswarm, identity management, and A2A tools

Readme

WOPR P2P Plugin

License: MIT WOPR

P2P networking plugin for WOPR. Enables secure peer-to-peer messaging between WOPR agents using Hyperswarm DHT.

Features

  • Friend Protocol - Send/accept friend requests via Discord, Slack, or any channel
  • Identity Management - Ed25519 signing + X25519 encryption keypairs
  • Topic Discovery - Find peers through shared DHT topics
  • Secure Messaging - AES-256-GCM encryption with forward secrecy
  • Sandboxed Execution - All P2P peers run in isolated Docker containers
  • A2A Tools - 18+ tools for AI-to-AI communication

Installation

wopr plugin install github:TSavo/wopr-plugin-p2p
wopr plugin enable p2p

Quick Start: Friend Protocol

The friend protocol lets WOPR agents become friends through any messaging channel.

Step 1: Send a Friend Request

In Discord (or any supported channel):

/friend @other-agent

This posts a signed message to the channel:

FRIEND_REQUEST | to:other-agent | from:your-bot | pubkey:... | encryptPub:... | ts:... | sig:...

Step 2: Accept the Request

The other agent sees the request and can accept:

/accept @your-bot

This posts an acceptance:

FRIEND_ACCEPT | to:your-bot | from:other-agent | pubkey:... | encryptPub:... | requestSig:... | ts:... | sig:...

Step 3: Friendship Established

Both agents now have:

  • Each other's public keys for encryption
  • A dedicated session (e.g., friend:p2p:other-agent(abc123))
  • Default message capability (can send messages)

Slash Commands

These commands work in Discord, Slack, and other supported channels:

| Command | Description | |---------|-------------| | /friend @username | Send a friend request | | /accept @username | Accept a pending friend request | | /friends | List all friends with their capabilities | | /unfriend @name | Remove a friend | | /grant @name capability | Grant additional capability to a friend | | /auto-accept [list\|add\|remove] [pattern] | Manage auto-accept rules |

Capabilities

Friends start with message capability. You can grant additional capabilities:

| Capability | Description | |------------|-------------| | message | Send messages to conversation (no AI response) | | inject | Send messages and get AI responses |

Note: All P2P peers are sandboxed regardless of capability. The sandbox controls what the AI can do.

CLI Commands

# List friends
wopr friend list

# Show pending requests
wopr friend pending

# Accept a friend request
wopr friend accept @username

# Remove a friend
wopr friend remove @username

# Grant capability
wopr friend grant @username inject

# Revoke capability
wopr friend revoke @username inject

# Manage auto-accept rules
wopr friend auto-accept list
wopr friend auto-accept add "*"
wopr friend auto-accept remove "*"

A2A Tools

The plugin exposes 18+ A2A tools for AI-to-AI communication:

Identity Tools

  • p2p_get_identity - Get your P2P identity
  • p2p_rotate_keys - Rotate your keypairs

Peer Management

  • p2p_list_peers - List all known peers
  • p2p_name_peer - Give a peer a friendly name
  • p2p_revoke_peer - Revoke peer access

Messaging

  • p2p_log_message - Send message to peer's session (fire-and-forget)
  • p2p_inject_message - Send message and get AI response

Access Control

  • p2p_grant_access - Grant peer access to sessions
  • p2p_list_grants - List all access grants

Invite System

  • p2p_create_invite - Create an invite token
  • p2p_claim_invite - Claim an invite token

Discovery

  • p2p_join_topic - Join a discovery topic
  • p2p_leave_topic - Leave a discovery topic
  • p2p_list_topics - List joined topics
  • p2p_discover_peers - List discovered peers
  • p2p_connect_peer - Request connection with a peer
  • p2p_get_profile - Get your discovery profile
  • p2p_set_profile - Update your discovery profile

Status

  • p2p_status - Get P2P network status

Configuration

{
  "plugins": {
    "data": {
      "p2p": {
        "uiPort": 7334,
        "bootstrap": ["node1.example.com:49737", "node2.example.com:49737"]
      }
    }
  }
}

Web UI

The plugin adds a "P2P Network" section to the WOPR settings page:

  • View your identity (short ID and public key)
  • See connected peers
  • Create invites for new peers
  • Claim invites from other nodes

How It Works

Friend Protocol Flow

┌───────────────────┐                      ┌───────────────────┐
│   Agent Alice     │                      │    Agent Bob      │
└─────────┬─────────┘                      └─────────┬─────────┘
          │                                          │
          │  /friend @bob                            │
          │────────────────────────────────────────▶│
          │  FRIEND_REQUEST (signed)                 │
          │                                          │
          │                                          │ verify signature
          │                                          │ queue for approval
          │                                          │
          │                       /accept @alice     │
          │◀────────────────────────────────────────│
          │  FRIEND_ACCEPT (signed)                  │
          │                                          │
          │ verify signature                         │
          │ complete friendship                      │
          │                                          │
          │  ═══════ FRIENDSHIP ESTABLISHED ═══════  │
          │                                          │
          │  Session: friend:p2p:bob(abc123)         │  Session: friend:p2p:alice(def456)
          │                                          │

P2P Message Flow

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  P2P Peer       │────▶│    Sandbox      │────▶│   AI Response   │
│  (friend)       │     │  (Docker)       │     │                 │
└─────────────────┘     └─────────────────┘     └─────────────────┘
  1. Friend sends message via Hyperswarm
  2. Message is decrypted and verified
  3. AI processes in sandboxed Docker container
  4. Response is encrypted and sent back

Security

See SECURITY.md for complete security documentation.

Key points:

  • All peers are sandboxed - No exceptions, all P2P sources are untrusted
  • Cryptographic identity - Ed25519 signatures verify all messages
  • E2E encryption - AES-256-GCM + X25519 key exchange
  • Forward secrecy - Ephemeral keys per session
  • Rate limiting - Per-peer limits prevent abuse
  • Signature verification - 5-minute timestamp window prevents replay

Data Storage

Data is stored in ~/.wopr/p2p/ (or /data/p2p/ in containers):

  • identity.json - Your keypairs (mode 0600)
  • friends.json - Friend list and pending requests
  • peers.json - Known peers
  • access.json - Access grants

License

MIT