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

@capsuleos/libkrun

v0.1.0

Published

Experimental self-hosted libkrun microVM sandbox provider for CapsuleOS.

Downloads

109

Readme

@capsuleos/libkrun

Experimental Linux microVM provider for CapsuleOS, backed by an application-owned @capsuleos/microvm-supervisor service. It is intentionally not enabled by a default or ambient configuration path.

The v1 compatibility profile is pinned to libkrun 1.18.0 and libkrunfw 5.4.0. Construction requires the exact acceptance string shown below, and every create preflight verifies the supervisor-reported runtime, firmware, architecture, isolation mode, and host capabilities before allocation.

import { createCapsule } from "@capsuleos/core";
import { libkrun } from "@capsuleos/libkrun";
import { createUnixMicrovmSupervisorClient } from "@capsuleos/microvm-supervisor";

const supervisor = createUnixMicrovmSupervisorClient({
  socketPath: "/run/capsuleos/hostd.sock",
});

const capsule = createCapsule({
  providers: {
    local: libkrun({
      supervisor,
      namespace: "preview-agents",
      experimental: {
        accept: "libkrun-1.18.0+libkrunfw-5.4.0",
      },
      image: {
        template: "agent-linux",
        reference: "registry.example.invalid/agent-linux",
        version: "2026-08-02",
        manifestDigest: "sha256:...",
        architecture: "x86_64",
      },
      guestTokenProvider: (sandboxId) => issueGuestTokenFor(sandboxId),
    }),
  },
});

Security and lifecycle profile

  • The supervisor must report worker-frozen retention, supervisor-isolated jailer mode, KVM, cgroup v2, the cgroup freezer, and a network namespace.
  • Suspend freezes the exact worker generation. Resume thaws that same generation. The provider never allocates a replacement while resuming.
  • The configured provider image is fixed. OCI images, image drift, privileged settings, host access, devices, GPUs, dynamic disks, and restricted egress are rejected before allocation.
  • Capsule's guest protocol runs over a length-prefixed supervisor byte stream. No public ingress, public vsock, or snapshot capability is exposed.
  • The current supervisor protocol has no create-time environment or secret channel. Non-empty spec.env and inputs.secrets are rejected instead of being ignored. Per-process environment values still travel through the authenticated guest process API, and archives remain supported by Capsule's post-create bootstrap.
  • Idempotency keys, image identities, ownership, generation fences, guest endpoints, runtime digests, and firmware digests are checked on every authoritative record.

This package is experimental because libkrun does not provide Firecracker-style VM pause or snapshot primitives in this profile. Retention relies on freezing the isolated supervisor worker, so host upgrades and supervisor behavior remain part of the trust boundary.

The provider still works with AI SDK Harness without public ingress: its authenticated guest process service advertises stdin, so the Harness adapter selects the loopback process tunnel.