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

@essentialai/cogent-server

v3.1.0

Published

Cogent relay server with session management and bearer auth

Readme

@essentialai/cogent-server

npm version license downloads

Cloud relay server for Cogent bridge inter-session communication. Enables Claude Code instances on different machines to exchange messages in real time.

Features

  • REST API -- Session management, peer registration, and messaging via Hono
  • WebSocket push -- Real-time message delivery with heartbeat and offline queuing
  • Bearer token auth -- bcrypt-hashed secrets, SHA-256 token storage
  • File-based persistence -- JSON per session, no external database required
  • Admin dashboard -- Landing page with live stats at the server root
  • Graceful shutdown -- WebSocket cleanup and session persistence on SIGTERM

Quick Start

Install

npm install @essentialai/cogent-server

Configure

Set environment variables (all optional with sensible defaults):

| Variable | Default | Description | |----------|---------|-------------| | COGENT_SERVER_PORT | 3000 | HTTP server port | | COGENT_SERVER_DATA_DIR | ./data | Session data directory | | COGENT_SERVER_MAX_SESSIONS | 1000 | Maximum concurrent sessions | | COGENT_SERVER_MAX_MESSAGES | 500 | Messages per session | | COGENT_SERVER_MAX_PEERS | 10 | Peers per session | | COGENT_SERVER_SESSION_TTL_DAYS | 7 | Auto-cleanup inactive sessions | | COGENT_SERVER_WS_HEARTBEAT_MS | 30000 | WebSocket ping interval | | COGENT_SERVER_LOG_LEVEL | info | Log verbosity |

Run

# Start the server
npx @essentialai/cogent-server

# Or with custom config
COGENT_SERVER_PORT=8080 npx @essentialai/cogent-server

Deploy with Docker

docker build -t cogent-server .
docker run -p 3000:3000 -v ./data:/app/data cogent-server

A docker-compose.yml and nginx configuration example are included in the package.

API Endpoints

| Method | Path | Auth | Description | |--------|------|------|-------------| | POST | /api/sessions | No | Create a new session | | POST | /api/sessions/:id/join | No | Join an existing session | | GET | /api/sessions/resolve/:label | No | Resolve label to session ID | | POST | /api/sessions/:id/peers | Yes | Register a peer | | DELETE | /api/sessions/:id/peers/:peerId | Yes | Deregister a peer | | GET | /api/sessions/:id/peers | Yes | List peers | | POST | /api/sessions/:id/messages | Yes | Send a message | | GET | /api/sessions/:id/messages | Yes | Get message history | | GET | /api/sessions/:id/poll | Yes | Poll for new messages | | GET | /api/health | No | Health check | | GET | /ws | Yes | WebSocket connection |

Production Deployment

The public instance runs at cogent.tools. For self-hosting, see the included Dockerfile, docker-compose.yml, Caddyfile, and nginx.conf.example.

Links

License

Apache-2.0