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

@omnixal/openclaw-nats-plugin

v0.1.11

Published

NATS JetStream event-driven plugin for OpenClaw

Readme

@omnixal/openclaw-nats-plugin

NATS JetStream event-driven plugin for OpenClaw. Replaces polling-based heartbeat with real-time event streaming.

What it does

Hooks into OpenClaw Gateway lifecycle and publishes events to NATS JetStream — tool completions, session starts/stops, subagent spawns, commands, context compaction. A sidecar service handles NATS connectivity, deduplication, filtering, and a pending event queue for inbound processing.

Install

openclaw plugins install @omnixal/openclaw-nats-plugin
npx @omnixal/openclaw-nats-plugin setup
openclaw gateway restart

Setup auto-detects your runtime (Bun or Docker) and configures NATS server + sidecar.

Published events

| Subject | Trigger | |---|---| | agent.events.gateway.startup | Gateway starts | | agent.events.session.new | /new command | | agent.events.session.reset | /reset command | | agent.events.session.stop | /stop command | | agent.events.session.started | Session begins | | agent.events.session.ended | Session ends | | agent.events.tool.{name}.completed | Tool succeeds | | agent.events.tool.{name}.failed | Tool fails | | agent.events.subagent.spawned | Subagent created | | agent.events.subagent.ended | Subagent finished | | agent.events.agent.run_ended | Agent run completes | | agent.events.message.sent | Message delivered | | agent.events.context.compacted | Context history compressed |

Dashboard

Built-in web UI at /nats-dashboard on the Gateway. Shows NATS/Gateway/sidecar health, pending event queue, and configuration. Auto-refreshes every 5 seconds.

Architecture

OpenClaw Gateway
  ├── hooks/gateway-startup     → publishes startup event
  ├── hooks/lifecycle-publisher  → publishes tool results
  ├── hooks/command-publisher    → publishes /new, /reset, /stop
  └── plugins/nats-context-engine
        ├── session/agent/subagent/message/compaction events
        └── /nats-dashboard (Svelte SPA)

NATS Sidecar (OneBun service, port 3104)
  ├── Publisher   → receives events via HTTP, publishes to JetStream
  ├── Consumer    → subscribes to JetStream, delivers to Gateway
  ├── Dedup       → idempotency key deduplication
  ├── Filter      → subject allowlist/blocklist
  ├── Pending     → SQLite queue for inbound events
  └── Health API  → /api/health for dashboard

Management

npx @omnixal/openclaw-nats-plugin start       # Start services
npx @omnixal/openclaw-nats-plugin stop        # Stop services
npx @omnixal/openclaw-nats-plugin status      # Health check
npx @omnixal/openclaw-nats-plugin uninstall   # Remove (keeps data)
npx @omnixal/openclaw-nats-plugin uninstall --purge  # Remove everything

Configuration

Environment variables (auto-configured by setup):

| Variable | Default | Description | |---|---|---| | NATS_SIDECAR_URL | http://127.0.0.1:3104 | Sidecar HTTP endpoint | | NATS_PLUGIN_API_KEY | (auto-generated) | API key for sidecar auth | | NATS_SERVERS | nats://127.0.0.1:4222 | NATS server URL |

Requirements

  • OpenClaw Gateway v2026.3+
  • Bun (recommended) or Docker

License

MIT