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

@vite-hub/runtime

v0.0.3

Published

Shared runtime context, capability, policy, approval, and tracing primitives for ViteHub.

Readme

@vite-hub/runtime

@vite-hub/runtime shares host context, capability handles, policy decisions, approvals, traces, and leases across packages.

Install

pnpm add @vite-hub/runtime

Minimal API

// server/utils/runtime-context.ts
import {
  createExecutionContext,
  defineCapability,
  getCapability,
  resolveCapabilityPolicy,
} from "@vite-hub/runtime"

const context = createExecutionContext({
  runtime: "vite",
  memo: (key, create) => create(),
  waitUntil: task => task.catch(() => {}),
  capabilities: {
    kv: defineCapability("kv", {
      get: async (_key: string) => null,
    }),
  },
})

const kv = getCapability(context, "kv")

const decision = await resolveCapabilityPolicy("require-approval", {
  capability: kv.name,
  operation: "write",
})

An omitted policy resolves to allow. Pass require-approval or deny when an operation needs an explicit gate.

Execution authority

ExecutionAuthority is the normalized, provider-independent description of what one resolved execution surface grants. It records filesystem access and scope, network egress, environment inheritance, credential access, process execution, and the isolation mechanism. Read it from the resolved owner, such as box.plan.executionAuthority, WorkspaceSession.executionAuthority, SandboxRunner.executionAuthority, or AgentInspectionMetadata.config.driver.executionAuthority.

Each resolved descriptor is an immutable snapshot of the authority known at resolution time. unknown means the provider cannot prove or did not report that dimension; it never means none. isolation identifies a mechanism such as a container or microVM, but it is not a security rank and does not imply anything about filesystem, network, credentials, or processes. Providers must report every dimension explicitly instead of inheriting a permissive default.

Executable selection, fixed argument arrays, and executable allowlists are dispatch controls. They do not constrain what a selected process can read, reach, inherit, or spawn, so they are not represented as isolation.

ViteHubError clones and freezes its JSON-safe public details at construction, and toJSON() always returns that immutable snapshot. Put raw provider failures in cause; changing the original details or the error's public fields later cannot change serialized output. Accessors, cycles, bigint, non-finite numbers, and oversized detail trees are rejected with a fixed TypeError, so callers that previously passed mutable or non-JSON detail objects must normalize them first.

Used by

Feature packages use Runtime Capability handles instead of passing every provider client through every API. Agent Capabilities consume these handles when they expose KV, Blob, DB, sandbox, shell, or workspace behavior.

Learn more at vitehub.dev.