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

@bytesbrains/pi-agent-supervisor

v1.3.0

Published

Runtime safety net for AI agents — blocks dangerous commands, protects files, enforces rate limits, and records sessions.

Readme

Agent Supervisor for Pi

npm version license

Runtime safety net for AI agents — blocks dangerous commands, protects sensitive files, enforces rate limits, and records sessions to an append-only audit log.

Philosophy

The other three gates handle what agents do (contrib, review, project). The supervisor handles how agents do it — in real-time, while they work.

Install

pi install npm:@bytesbrains/pi-agent-supervisor

Tools

| Tool | What it does | |---|---| | supervisor_status() | Show session stats — rate, errors, blocked calls | | supervisor_log(tail) | Read audit log (read-only, last N lines) | | supervisor_override(reason) | Request human override for blocked operation |

Runtime Protections

These run passively on every tool call — no agent action needed:

| Protection | Default | Behavior | |---|---|---| | Dangerous commands | 12 patterns | Blocks rm -rf /, git push --force, sudo, fork bombs, etc. | | File protection | 6 files + 5 patterns | Blocks writes to .env, credentials, SSH keys, secrets | | Rate limiting | 50/min warn, 80/min block | Pauses agent if tool call rate exceeds threshold | | Error escalation | 3 consecutive | Alerts human after 3+ consecutive errors | | Audit logging | Enabled | Append-only log of all tool calls, errors, blocks |

Configuration

Create .supervisorrc.yml:

# Blocked command patterns (comma-separated regex)
blockedPatterns: "rm\\s+-rf\\s+/,rm\\s+-rf\\s+~,git\\s+push\\s+.*--force,sudo,chmod\\s+777"

# Protected files (write blocked)
protectedFiles: ".env,.env.local,credentials.json,.claude/settings.local.json,.git/config"

# Protected file patterns (glob)
protectedPatterns: "*.pem,*.key,id_rsa*,*secret*,*credential*"

# Rate limiting
rateLimitPerMinute: 50     # Warn threshold
rateLimitHardBlock: 80     # Block threshold

# Error escalation
maxConsecutiveErrors: 3    # Escalate after this many consecutive errors

# Audit log
enableAuditLog: true
auditLogPath: ".supervisor/audit.log"

Audit Log

Every action is recorded to an append-only log:

[2026-05-14T04:00:00.000Z] SESSION_START host=macbook cwd=/project
[2026-05-14T04:00:01.000Z] CALL bash (rate: 1/min)
[2026-05-14T04:00:02.000Z] CALL edit (rate: 2/min)
[2026-05-14T04:00:03.000Z] BLOCK dangerous-cmd: rm -rf /tmp/*
[2026-05-14T04:00:04.000Z] ERROR bash: command not found (consecutive: 1)
[2026-05-14T04:00:05.000Z] SESSION_END calls=15 errors=1 blocked=1

The log is append-only — agents cannot modify or delete it.

Examples

Blocked: Dangerous Command

→ bash("sudo rm -rf /")
⛔ Dangerous command blocked (pattern: "sudo")
→ supervisor_override(reason="Need to clean deployment directory")
Human confirmation required...

Blocked: Protected File

→ write(".env", "SECRET=xyz")
⛔ Write to protected file blocked: .env

Rate Limited

⚠️ High tool call rate (55/50 calls/min). Slow down.
⛔ Rate limit exceeded (85/80 calls/min). Paused.

Integration

Install all four gates for full agent governance:

pi install npm:@bytesbrains/pi-contrib-gate
pi install npm:@bytesbrains/pi-review-gate
pi install npm:@bytesbrains/pi-project-gate
pi install npm:@bytesbrains/pi-agent-supervisor

License

MIT © nandal