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

@chrguard/ai-guardian-plugin

v0.1.7

Published

OpenClaw AI Guardian tool-audit plugin for auditing and enforcing policies on tool calls.

Readme

AI Guardian Plugin (tool-audit)

OpenClaw plugin that audits and optionally blocks agent tool calls via an external policy API. Use it to enforce red/green/yellow policies or "jail" the agent when too many actions are red-flagged.

Install

From the plugin directory (e.g. after cloning this repo):

openclaw plugins install /path/to/ai-guardian-plugin

Or from npm (once published):

openclaw plugins install @yourscope/ai-guardian-plugin

Config

In ~/.openclaw/openclaw.json under plugins.entries["tool-audit"]:

| Option | Description | |--------|-------------| | enabled | Enable the plugin (default: true) | | endpoint | Your policy API URL (POST). Plugin sends kind, tool, params, args, sessionKey, runId, etc. | | enforceDecision | If true, use API response to block: API returns allow: false → tool/agent is blocked | | decisionField | JSON field name for allow/deny (default: "allow") | | apiKey | Optional Bearer token for the API | | timeoutMs | Request timeout (default: 3000) | | debug | Extra gateway logs for hook firing | | localAuditPath | Optional path to append audit events (e.g. ~/.openclaw/logs/tool-audit.jsonl) | | chromiaBrid | Chromia BRID for on-chain policy decisions (enables Chromia mode when set with nodes) | | chromiaNodes | Chromia node URL list (array or comma-separated string) | | chromiaJudgeOperation | Operation name to submit action for judging (default: judge_action) | | chromiaStatusQuery | Query name to poll verdict status (default: get_judgment_status) | | chromiaPollIntervalMs | Poll interval for verdict checks (default: 1000) | | chromiaPollTimeoutMs | Max poll time for verdict checks (default: 20000) | | chromiaEncryptedAction | Optional encrypted_action argument for judge_action | | chromiaCliPath | Path to Chromia CLI binary (default: chr) | | chromiaTxAwait | Whether to submit tx with --await (default: true) | | chromiaTxTimeoutMs | Timeout for chr tx call in ms (default: 10000) | | chromiaQueryTimeoutMs | Timeout for each chr query poll call in ms (default: 5000) | | chromiaSecretPath | Optional path passed as --secret to chr tx | | chromiaFtAuth | If true, adds --ft-auth to chr tx |

Your API must respond with JSON, e.g. { "allow": true } or { "allow": false, "reason": "blocked by policy" }.

Chromia mode (on-chain decisioning)

When chromiaBrid + chromiaNodes are set, decisioning uses Chromia instead of HTTP endpoint:

  1. Submit operation: judge_action(id, action_text, action_context, encrypted_action)
  2. Poll query each second (configurable): get_judgment_status(id)
  3. If query returns status = "answered":
    • verdict = "red" -> block (allow: false)
    • verdict = "green" or "yellow" -> allow (allow: true)
    • reason is forwarded as plugin reason text

Notes:

  • If chromiaBrid is not set, plugin falls back to CLAWCHAIN_BRID env var.
  • If chromiaNodes is not set, plugin falls back to CLAWCHAIN_NODE env var (comma-separated accepted).
  • To match FT-authenticated runtime usage, set chromiaSecretPath and chromiaFtAuth: true.

Hooks

  • before_agent_start – Fires before an agent run. When enforceDecision is on and the API returns allow: false, the agent start can be blocked (if the runtime honors it).
  • before_tool_call – Fires before each tool execution. When enforceDecision is on and the API returns allow: false, the tool is blocked. Uses api.on() so OpenClaw’s hook runner sees it.

Tools

The tools/ directory includes:

  • dummy-audit-server.mjs – Test server that accepts audit POSTs and returns allow/block. Default: allow all; set BLOCK_TOOLS=1 to block all.
  • openclaw-tool-audit-example.json – Example config snippet for plugins.entries["tool-audit"].
  • transcript-audit-forwarder.mjs – Forwards session transcript events to your audit endpoint.
  • log-audit-forwarder.mjs – Tails the gateway log and forwards tool-related lines to your audit endpoint.

See tools/README.md for usage.

License

MIT