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

operon-os-sandbox

v0.1.0-alpha.6

Published

OS-level command sandboxing for the LocalMachine: every Machine.run is wrapped in the platform sandbox (macOS Seatbelt / Linux bubblewrap, via @anthropic-ai/sandbox-runtime) with workspace-scoped write access, domain-allowlist networking, and sandbox-deni

Readme

operon-os-sandbox

OS-level command sandboxing for the local Machine. Every Machine.run — the bash tool, search binaries, user hooks, everything — is wrapped in the platform sandbox before it spawns: Seatbelt (sandbox-exec) on macOS, bubblewrap on Linux, via @anthropic-ai/sandbox-runtime (srt).

  • Filesystem: writes are allowed only under each machine's cwd + additionalDirs + tmp + the framework's task-log dir; reads are open except srt's built-in credential protections plus your denyRead.
  • Network: deny-all by default. Traffic is forced through a local filtering proxy with a domain allowlist; out-of-list hosts can be routed to an ask callback (wire it to your approval UI).
  • Visibility: OS-level denials observed during a run are annotated onto that command's stderr as a <sandbox_violations> block, so the model sees why a command failed instead of a bare exit code. Known-benign startup noise is filtered.
  • Degrade, don't break: unsupported platform (Windows) or missing dependencies (no bwrap) → machine() returns a plain LocalMachine and status.reason says why. Same API either way.

Usage

import { OsSandbox } from "operon-os-sandbox";

// Once per process (starts the network filter proxy).
const sandbox = await OsSandbox.start({
  network: {
    allowedDomains: ["registry.npmjs.org", "*.github.com"],
    onAskHost: async ({ host, port }) => askUserSomehow(host, port),
  },
  filesystem: {
    denyRead: ["~/secrets"],
    denyWrite: [],           // e.g. [`${work}/.env`]
  },
});
if (!sandbox.status.enabled) console.warn(`os-sandbox off: ${sandbox.status.reason}`);

// Wherever you previously built the machine:
//   machine: new LocalMachine(WORK)
// becomes:
const machine = sandbox.machine(WORK);

// ... hand it to createAgent / the session as usual. withCwd() siblings
// (subagent worktrees) stay sandboxed automatically.

await sandbox.dispose(); // on shutdown

Only local machines are wrapped — SSH and vendor-sandbox machines run their commands elsewhere, so this layer deliberately does not touch them. Direct file I/O (readBytes/writeText/…) is also untouched: those are the framework's own code paths, gated by its path-access policy; the OS sandbox exists for arbitrary commands, which have no such gate.

Platform requirements

  • macOS: none (uses /usr/bin/sandbox-exec).
  • Linux: bubblewrap, socat, ripgrep installed. Ubuntu 24.04+ needs kernel.apparmor_restrict_unprivileged_userns=0 (or an AppArmor userns profile). Missing pieces are reported in status.reason and the sandbox degrades to plain LocalMachine.
  • Windows: not supported by this package (srt's Windows backend is alpha and needs an elevated install); always degrades.

Caveats

  • One OsSandbox per process — srt's SandboxManager is a process-wide singleton. Different machines (different cwds) are fine; a second start() with a different config is not.
  • The network allowlist only serves proxy-aware clients (HTTP/HTTPS via env vars, TCP via SOCKS). Raw-TCP clients that ignore proxies — plain ssh, DB drivers — stay blocked even with ["*"]; grant a unix socket, or run those outside the sandbox.
  • Violation annotation is best-effort: the macOS monitor tails log stream, which lags slightly (failed commands get one 250 ms re-check).
  • @anthropic-ai/sandbox-runtime is pinned exactly (0.0.x — API still moves).