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

openclaw-discord-audit-stream

v2.0.6

Published

Monitors OpenClaw session files and sends all events to a Discord channel via webhook

Downloads

58

Readme

OpenClaw Discord Audit Stream

npm version License: MIT GitHub release

Discord Audit Stream Example

Monitor all OpenClaw session events and stream them to a Discord channel in real-time.

Installation

openclaw plugins install openclaw-discord-audit-stream

Configuration

Configure in your OpenClaw config (~/.openclaw/openclaw.json):

Option A: Fallback Mode (uses OpenClaw's Discord bot)

No webhook setup needed - uses your existing OpenClaw Discord integration:

{
  "plugins": {
    "entries": {
      "openclaw-discord-audit-stream": {
        "enabled": true,
        "config": {
          "sendMethod": "fallback",
          "fallbackChannelId": "YOUR_DISCORD_CHANNEL_ID"
        }
      }
    }
  }
}

Option B: Webhook Mode (faster, recommended)

{
  "plugins": {
    "entries": {
      "openclaw-discord-audit-stream": {
        "enabled": true,
        "config": {
          "sendMethod": "webhook",
          "webhookUrl": "https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"
        }
      }
    }
  }
}

Option C: Auto Mode (tries webhook, falls back to CLI)

{
  "plugins": {
    "entries": {
      "openclaw-discord-audit-stream": {
        "enabled": true,
        "config": {
          "sendMethod": "auto",
          "webhookUrl": "https://discord.com/api/webhooks/...",
          "fallbackChannelId": "YOUR_CHANNEL_ID"
        }
      }
    }
  }
}

Configuration Options

| Option | Required | Description | Default | |--------|----------|-------------|---------| | webhookUrl | No* | Discord webhook URL | - | | fallbackChannelId | No* | Channel ID for openclaw CLI fallback | - | | sendMethod | No | "webhook", "fallback", or "auto" | "auto" | | rateLimitMs | No | Rate limit between messages (ms) | 2000 | | batchWindowMs | No | Batch window for grouping events (ms) | 8000 | | maxBatchSize | No | Max events per batch | 15 | | agentEmojis | No | Emoji mappings for agents | { clawd: "🦞" } |

*Either webhookUrl or fallbackChannelId must be provided depending on sendMethod.

Send Methods

Webhook (Recommended)

  • ✅ Faster - direct HTTP POST
  • ✅ More reliable - no external dependency
  • ✅ Works without openclaw CLI installed
  • ✅ Lower resource usage

Fallback (OpenClaw CLI)

  • ✅ No webhook setup needed
  • ✅ Can send to any channel you have access to
  • ❌ Slower - spawns a subprocess
  • ❌ Higher resource usage

Auto Mode (Default)

Tries webhook first, falls back to openclaw CLI if webhook fails.

Agent Skill

Share skills/discord-audit-stream/SKILL.md with your AI agent for automated installation and configuration.

Features

Event Tracking

  • Tool Calls - exec, edit, write, read, etc. with durations
  • User Messages - Sender name + preview
  • Response Completion - Token counts
  • Thinking/Reasoning - Agent thoughts
  • Errors - Timeouts, API errors, aborts
  • Model Changes - Mid-session switches
  • Context Compaction - Token summaries
  • Images - MIME type metadata

Smart Formatting

  • 40+ event-specific icons
  • Millisecond timestamps
  • Diff statistics (lines/chars added/removed)
  • Session metadata (project, model, tokens)

Performance

  • Smart batching (groups events in time windows)
  • Rate limiting (respects Discord limits)
  • Handles large files (up to 10MB)
  • State persistence across restarts

Event Icons

| Icon | Event | Icon | Event | |------|-------|------|-------| | ⚡ | exec | ✏️ | edit | | 📝 | write | 📖 | read | | 🔍 | grep/glob | 🌐 | webfetch | | 💬 | User message | ✅ | Response completed | | 💭 | Thinking | ❌ | Error | | 🔄 | Model change | 🗜️ | Context compaction | | 🖼️ | Image | 🧠 | Thinking level |

Troubleshooting

No messages appearing

  1. Verify config in ~/.openclaw/openclaw.json
  2. Restart gateway: openclaw gateway restart
  3. Check daemon: ps aux | grep daemon.ts
  4. Check logs: journalctl --user -u openclaw-gateway.service -f

Rate limited

  • Increase rateLimitMs (default: 2000ms)
  • Discord limit: 5 requests per 2 seconds

Uninstall

openclaw plugins uninstall openclaw-discord-audit-stream

How It Works

  1. Watch - Monitors OpenClaw session files via fs.watch
  2. Parse - Reads new JSON lines from offset
  3. Track - Records events with timestamps
  4. Batch - Groups events within time window
  5. Send - POSTs to Discord webhook or via OpenClaw CLI

License

MIT License - See LICENSE

Support

  • GitHub: https://github.com/Sabrimjd/discord-audit-stream
  • npm: https://www.npmjs.com/package/openclaw-discord-audit-stream
  • Issues: https://github.com/Sabrimjd/discord-audit-stream/issues