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

@liy/mote-pi-runtime

v0.3.9

Published

Per-run Mote agent runtime: the Pi RPC bridge, precompiled Pi extensions, and agent skills.

Readme

@liy/mote-pi-runtime

Everything a Mote agent loads inside its own process: the Pi RPC bridge, the precompiled Pi extensions, the universal Agent Skills, and the agent-facing orchestrator CLI.

| Binary | Role | | --- | --- | | mote-pi-rpc | Per-run Pi process the orchestrator spawns for each launch | | orchestrator | CLI agents invoke to call back into the orchestrator |

The CLI implementation and authenticated MCP stdio bridge live in this package. orchestrator mcp <server-ref> forwards built-in mote and private connection UUIDs through the same launch-authenticated socket protocol. The CLI never selects upstream URLs or credentials. Private connection discovery runs asynchronously during extension registration; a failed directory lookup leaves built-in Mote available and reports a safe warning.

Pi 1.1.0's native MCP and tool_search extensions are registered by the SDK runtime. Connections are user scoped; no profile or project mcp.json is read or written. Private tools are deferred under stable UUID namespaces; registered descriptions carry quoted connection names into Pi's native mcp_servers section and tool search. Name changes and credential revisions refresh registrations. Private servers connect in the background without delaying ordinary first prompts; discovery waits when their tools are needed. Mote's proposal and inline-widget tools are direct so their structured results reach the timeline. Native logs live under the writable session's debug/ directory.

Internal and compatible private servers use stateless MCP 2025-11-25 with initialization and request-scoped JSON/SSE. The gateway rejects private servers requiring sessions or another revision. Adopt newer revisions when Pi supports them; there is no protocol translator or alternate adapter implementation.

Code Mode is enabled on every fresh or resumed RPC launch. The runtime registers Pi's native extension and adds codemode to the merged profile/project tool selection, preserving explicit selections (including an empty selection). Mode on keeps ordinary selected tools available directly; there is no product toggle. Nested calls use Pi's normal validation and permission hooks, and native events retain parentToolCallId. Tool selection is visibility, not authorization; the JavaScript isolate does not restrict tools' external effects. Existing gateway and OS permission boundaries remain responsible for those effects.

Session event transport

The SDK subscription emits JSONL { type: "pi_event", event, contextSnapshot? } frames. event is the original Pi event. Completed messages and compaction outcomes also carry a context-usage estimate with model identity and sampling time, captured after Pi updates its session. RPC responses remain unwrapped control frames. The orchestrator must support this envelope before this runtime is installed; context usage is not added to or rewritten inside native payloads. Pi's agent_settled.aborted is retained. The orchestrator terminates cancelled runs without handoff reminders or returning them to its idle pool; the channel does not route their last message to another agent.

Anthropic's SDK-selected beta capabilities travel in the HMAC-covered anthropicBetas field, validated against a shared closed vocabulary. The gateway reconstructs the header and injects the API key; arbitrary SDK headers and OAuth betas cannot cross this boundary. Install the updated gateway, Edge, and resident services before this runtime. Existing runtime requests without the field remain valid; application rollback does not rewrite Pi session files.

Why this package exists on its own

ADR-084 tiers the sandbox by what loads an artifact. Nothing resident loads this package: Pi runs as a spawned, detached child. A new version therefore takes effect at the next agent launch and needs no service restart. Publishing an extension fix or a new Pi release costs no downtime; a shipped skill is copied into each profile at its next template write (orchestrator boot or a profile save), so that users can customize an agent's skills.

Dependencies

Pi, pi-web-access and the component catalog CLI are ordinary dependencies pinned to exact versions. They are not peers: this package is the host that starts Pi, so nothing above it supplies an instance.

npm-shrinkwrap.json freezes the entire published production dependency tree, including integrity hashes and optional platform packages. The files manifest explicitly includes it because pnpm otherwise omits it from the tarball. pnpm dependencies:lock regenerates it after dependency/catalog changes; pnpm dependencies:check validates it offline, and prepack runs that check. Version-only release PRs update its root version without resolving dependencies. The workspace's pnpm lock and this published npm lock serve different consumers; validate a clean tarball install when changing the production tree.

Precompiled extensions

scripts/compile-extensions.mjs bundles the provider, prompt composer and web-access extensions at publish time into dist/extensions, so no compiler reaches a Sprite and Pi's loader never transpiles them. Pi's SDK and installed JavaScript dependencies stay external, preserving SDK identity and native assets.

The web-access extension locates assets relative to its installed package. A banner resolves that directory on load rather than baking it in, because the install path is not known at publish time. It resolves the real path first: agent profiles reach this tree through a symlinked extensions directory and Pi's loader keeps that symlinked path, so walking up from import.meta.url alone would escape the package.

Installed layout

/opt/mote/pi-runtime/<version>/            complete npm install root
/opt/mote/pi-runtime/<version>/extensions  -> the compiled extension tree
/opt/mote/pi-runtime/<version>/skills      -> the shipped Agent Skills
/opt/mote/pi-runtime/current               -> <version>

Agent profiles link to the stable current/extensions name and copy their skills from current/skills, so a version swap needs no profile rewrite. The orchestrator resolves current when it spawns, not at boot, which is what lets an update land without restarting anything.

Compatibility with the services

Nothing pairs the two packages by declaration. Semantic versioning carries that judgement, as it does for every published package: a release that changes either direction of the interface says so in its version.

One coupling is checked directly rather than by convention, because its failure is silent: the services refuse to publish a staged version of this package whose extensions and skills names do not resolve, since every agent profile links to the first and copies from the second, and a relocated directory would quietly empty each profile.

Release

pnpm release:pi-runtime:check packs a dry run. Publication is manual dispatch only, through npm trusted publishing.