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

@synthryn/sypi-sandbox

v0.6.0-beta.20260816.6a00fcae

Published

Wrap bash commands in SyPi's opt-in filesystem sandbox policy on macOS. Use it when you want shadow reporting or kernel-enforced write boundaries; it is inert unless the profile enables sandbox mode and does not restrict reads, network, or extension code.

Readme

sypi-sandbox

The hook half of the filesystem-sandbox subsystem. Profile resolution, shadow-mode scanning, the seatbelt wrapper, and per-command policy live in core/sandbox/ and need no extension API. This extension owns a tool_call hook. It passes each bash command to decideCommand, renders the result, and mutates event.input.command in place. This is the same seam used by sypi-rtk and the only SyPi mechanism that changes a bash command.

The active profile's two-axis sandbox field controls this extension. shadow observes commands that write outside the workspace boundary. enforce applies the kernel boundary by wrapping the command in sandbox-exec. Without a sandbox field, the extension is inert.

Platform coverage, stated once

core/sandbox's sandboxSupport(platform, probes) is the single coverage source. It reports full, partial, or unavailable; enforce mode accepts only full:

  • macOS: a functional sandbox-exec probe must pass before SyPi claims a full seatbelt boundary. Apple has deprecated sandbox-exec since 10.10.
  • Linux, Windows, and other platforms: confinement is unavailable. A requested enforce-mode command is blocked with SANDBOX_UNAVAILABLE; it never falls through to an unconfined process.

The boundary covers processes sypi launches. It does not constrain sypi or extension code running inside sypi. The boundary applies only to bash writes; reads and network access are unrestricted.

Profile field (two axes)

One field, sandbox, composes two orthogonal axes plus a write allowlist:

{
  "sandbox": {
    "mode": "shadow", // off | shadow | enforce   (filesystem boundary)
    "approval": "never", // never | on-request | untrusted  (human escalation)
    "trustedFolders": ["/abs/path"], // extra write roots beyond cwd + OS temp dirs
  },
}
  • mode: off is inert. shadow reports out-of-boundary writes and never blocks. enforce wraps every bash command in a deny-default seatbelt profile. The kernel then denies writes outside cwd, the canonical OS temp directories, and trustedFolders. Canonical aliases are deduplicated, and enforce mode refuses a workspace/temp containment overlap. When mode is unset, it defaults to shadow.
  • approval: never (default) never prompts. on-request and untrusted prompt when a UI is attached and the command is flagged. The prompt can allow, block, or escalate an out-of-boundary write.

The shadow scan is bounded and deterministic. It uses no LLM and adds no bash latency. It is a heuristic; the kernel seatbelt in enforce mode is the authoritative boundary. A malformed sandbox field fails closed to a shadow configuration. It observes and reports, never blocks, and emits one warning. If root resolution is invalid, shadow mode warns that analysis is unavailable instead of claiming a boundary.

YOLO bypass

Prefix a single command with YOLO (e.g. YOLO rm -rf /tmp/x) to run that ONE command unsandboxed. The prefix is re-typed per invocation, never persisted as a setting, and every use is appended to ~/.sypi/logs/sandbox-bypass.log (extending the session-bypass accountability trail). The next command is sandboxed again.

Notes

  • Entry: index.ts. It MUST be the LAST extension in pi.extensions (load-order security requirement, guarded by a test): enforce mode wraps the bash command after every other tool_call hook runs, so it sees the fully-decided command and never blinds the permission guard, and no later extension has its own bash view wrapped by us. A model-forged sandbox-exec is not trusted — our profiles carry a per-process signature, and an unsigned wrapper is nested inside our deny-default outer (macOS can only further-restrict a nested sandbox, never widen it).
  • Imports only the public extension API surface. No model-facing tool or new command. State (the bypass log) lives under ~/.sypi, never the repo.