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

@qmilab/lodestar-adapter-shell

v0.5.0

Published

Governed shell-command tool adapter for the Lodestar Action Kernel. Part of Lodestar, the trust layer for AI agents.

Readme

@qmilab/lodestar-adapter-shell

Governed shell-command tool adapter for the Lodestar Action Kernel — part of Lodestar, the trust layer for AI agents.

Declare the shell commands an agent may run as command specs; each becomes its own governed Tool with its own name and trust floor. Every call flows through the Action Kernel's two-phase propose → arbitrate → execute, and its output is captured as a typed shell.run@1 observation in the epistemic chain.

What it enforces

This is a TS-level audit / governance boundary, not an OS sandbox:

  • Fixed binary, argv-only. The binary is fixed by the spec; the agent supplies only args. Commands run via Bun.spawn with an argv array (never a shell string), so inputs cannot inject extra commands.
  • Allowlist. Each spec's argsMatcher validates the requested args and returns the final args to run — or throws to reject the call before anything is spawned.
  • No host-env passthrough. The subprocess sees only the declared env; process.env is never spread in. The default scoped env has a fresh empty HOME and git's global/system config disabled.
  • Wall-clock timeout. Every command has a deadline; the process is killed at the timeout and timed_out is reported.
  • Bounded output capture. stdout/stderr are captured up to a byte cap and flagged when truncated.
  • Pinned cwd. Every command runs in workspaceRoot; the agent cannot redirect it.

What it does not claim: it does not OS-sandbox the code it runs (no namespaces, cgroups, or network isolation). shell.test executes the workspace's own test code. OS-level enforcement graduates separately (see the package CLAUDE.md, docs/architecture/v02-delta.md §6, and ADR-0004).

Usage

import { registerShellTools, bunTest } from "@qmilab/lodestar-adapter-shell"

registerShellTools({
  workspaceRoot: "/path/to/repo",
  // env optional — defaults to a minimal scoped env (fresh HOME, PATH, git off)
  commands: [
    bunTest({ trust: 3 }), // shell.test — `bun test [-t <pattern>]`, auto-approves @L3
    {
      name: "shell.format",
      bin: "bun",
      argsMatcher: (a) => {
        if (a.length === 0) return ["run", "format"] // only `bun run format`
        throw new Error("shell.format takes no args")
      },
      trust: 3,
      reversibility: "compensable",
    },
  ],
})

The registered tools are then reachable through guard.wrap() / the Action Kernel like any other Lodestar tool. (The adapter is not reachable through the MCP proxy — the proxy only governs downstream MCP servers; see the Telenotes example.)

License

Apache-2.0