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

pi-turtle-rlm

v0.1.5

Published

pi-turtle-rlm — RLM for Pi: persistent runtime, llmQuery recursion (it's models all the way down)

Readme

pi-turtle-rlm

Recursive language model runtime for Pi — a persistent JS workspace inside the agent, with structured child calls via llmQuery, prompt modes, and session stats.

Turtles all the way down — each turtle is an llmQuery call, each shell is globalThis, base case maxDepth, or just run out of tokens.

npm version License

Install

Recommended — Pi package manager (see Pi packages):

pi install npm:pi-turtle-rlm

Pin a version:

pi install npm:[email protected]

From git:

pi install git:github.com/jpstrikesback/pi-rlm

From a local clone (contributors or vendoring):

git clone https://github.com/jpstrikesback/pi-rlm.git
cd pi-rlm
npm install
npm run build
pi install ./
# or one-off during development: pi -e ./index.ts

Project-local Pi config (.pi/settings.json or pi install -l):

{
	"packages": ["npm:pi-turtle-rlm"]
}

After install, start Pi as usual from your repo; the extension loads from Pi’s package resolution. Use /reload after upgrading the package.

Quick start

  1. Turn RLM on: /rlm
  2. Same command takes subcommands:
    • /rlm balanced | /rlm coordinator | /rlm aggressive — prompt mode
    • /rlm inspect — runtime globals
    • /rlm reset — clear runtime

When RLM is on you get a pink RLM MODE widget (with mode label) and footer stats: depth, rlm_exec count, child queries / turns, runtime variable count, and non-RLM tool calls (“leaf” count).

Why RLM?

Large refactors need more room for context than a single chat transcript. This extension gives the model a persistent workspace to keep intermediate state, recurse with llmQuery, and avoid re-deriving the same context over and over.

Tools

  • rlm_exec — run JS in the persistent runtime
  • rlm_inspect — inspect runtime globals
  • rlm_reset — clear the runtime

Inside rlm_exec you can use:

  • inspectGlobals()
  • final(value)
  • await llmQuery(request)

Use in an extension

import rlmExtension from "pi-turtle-rlm";

export default rlmExtension;

Or configure defaults:

import { createRlmExtension } from "pi-turtle-rlm";

export default createRlmExtension({
	maxDepth: 3,
	promptMode: "coordinator",
});

Safety

The worker uses node:vm with several globals stripped. It is not a security sandbox — treat it like running code in your user account.

Advanced runtime usage

Inside rlm_exec, the runtime also exposes llmQuery(...) for recursive child calls.

await llmQuery({
	prompt: "Analyze the auth module",
	state: { files: globalThis.authFiles },
	tools: "read-only",
	budget: "medium",
});

Inspiration

This project is inspired in part by AxLLM’s RLM ideas.

Development

git clone https://github.com/jpstrikesback/pi-rlm.git
cd pi-rlm
npm install
npm test
npm run build
npm run smoke

License

Apache-2.0 — see LICENSE.