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

@xemahq/worker-runtime-opencode

v0.19.0

Published

OpenCode RuntimeAdapter: descriptor, pure materialize (SessionRuntimeSpec to opencode config), launcher, state layout and the OpenCode-to-frames driver.

Downloads

9,771

Readme

@xemahq/worker-runtime-opencode

The OpenCode RuntimeAdapter. OPENCODE_ADAPTER is the registry entry a RuntimeHost hosts; the control plane imports only OPENCODE_DESCRIPTOR.

| Part | What it is | | --- | --- | | descriptor | Runtime kind, capability bits and the runtime profile schema. | | materialize(spec, ctx) | Pure. Renders a SessionRuntimeSpec into opencode.jsonc, agents/*.md, the platform overlay, skills and commands, plus argv and env. Same inputs, same output. | | launcher | Argv, env allowlist, pinned OpenCode version and the version probe. | | stateLayout | Where the runtime's files live per role, and the snapshot set. | | driver(transport, { spec }) | One continuous event processor per host maps OpenCode's native protocol to turn frames for every root session: one turn_started and one turn_ended per turn, usage as RuntimeReported and attributed to the model of the execution that produced it, interactionId on permission and question frames. runTurn serves injected turns (agent and model validated against the spec); observe reports runtime-initiated executions under host-minted turn ids; steer and compact map to the native operations. A stream disconnect never fails a turn: the driver reconnects and reconciles. A missing session on resume is SessionLostError, never a fresh start. |

Effective permissions (CONTRACT section 2.3)

The tool set is the profile ceiling, intersected with the posture and the composition. An agent's rules apply first-match inside that set; an unmatched tool is denied; an agent Allow never widens the set. Ask is emitted as native ask and answered only by the platform. A permission with no native form (an MCP wildcard pattern, a server name that could shadow a native action, an unknown builtin class) refuses with OpencodeMaterializeError and a MaterializeRefusal code; nothing is approximated. A model without a context window is refused, never defaulted.

An MCP server's allowTools bounds it: empty means <server>_*, otherwise one rule per listed tool and the rest of that server denied.

Tests

tests/parity.spec.ts compares the output with goldens captured from xema-base's composer (see the header of that file for the intended differences).