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

codebolt-wsproxyserver

v1.0.0

Published

CodeBolt Wrangler WebSocket Server for Cloudflare Workers

Readme

Codebolt Wrangler WebSocket Proxy

This package provides a Cloudflare Worker plus Durable Object that relays WebSocket messages between Codebolt agents and applications. The Durable Object maintains long-lived connections, queues payloads while peers are offline, and exposes a single /proxy endpoint for upgrades.

Installation

# Install dependencies
npm install

# or
pnpm install

# or
yarn install

Quick start

  1. Install Wrangler and authenticate with Cloudflare:

    npm install -g wrangler
    wrangler login
  2. Start the proxy locally:

    npm run dev
    # or
    wrangler dev
  3. Connect agents/apps to ws://localhost:8787/proxy and send JSON messages shaped like:

    • {"type":"register","actor":"agent","agentId":"agent-123","appToken":"my-app"}
    • {"type":"register","actor":"app","appToken":"my-app"}
    • {"type":"forward","actor":"agent","agentId":"agent-123","appToken":"my-app","target":"app","payload":{...}}

Deployment

Development Environment

npm run deploy
# or
wrangler deploy

Staging Environment

npm run deploy:staging
# or
wrangler deploy --env staging

Production Environment

npm run deploy:production
# or
wrangler deploy --env production

Available Scripts

  • npm run dev - Start the development server
  • npm run build - Type check the TypeScript code
  • npm run lint - Run ESLint
  • npm run lint:fix - Fix ESLint issues automatically
  • npm run deploy - Deploy to development environment
  • npm run deploy:staging - Deploy to staging environment
  • npm run deploy:production - Deploy to production environment
  • npm run tail - View real-time logs from the deployed worker

Configuration

The wrangler.toml file contains the configuration for your Cloudflare Worker:

  • name: The name of your worker
  • main: The entry point file
  • compatibility_date: The Cloudflare Workers API compatibility date
  • durable_objects: Configuration for Durable Objects
  • vars: Environment variables (different per environment)

Update the values in wrangler.toml with your account details before deploying.

Environment Variables

  • ENVIRONMENT: Set to "development", "staging", or "production"

Project Structure

├── src/
│   ├── durable/
│   │   └── proxyHub.ts    # Durable Object implementation
│   ├── index.ts           # Main exports
│   ├── types.ts           # TypeScript type definitions
│   └── worker.ts          # Cloudflare Worker entry point
├── package.json           # Dependencies and scripts
├── tsconfig.json          # TypeScript configuration
├── wrangler.toml          # Cloudflare Workers configuration
└── README.md              # This file

Requirements

  • Node.js 18+
  • Wrangler CLI 3+
  • Cloudflare account