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

mastra-rlm-kit

v0.1.0

Published

Paper-faithful Recursive Language Model (RLM) loop for Mastra

Readme

mastra-rlm-kit

Portable, paper-faithful Recursive Language Model (RLM) package for Mastra.

Repository-level docs (integration example, benchmarks, and release context) are centralized in:

  • ../../README.md

Install

npm install mastra-rlm-kit @mastra/core zod

Technical Article

For a full technical write-up (architecture, loop mechanics, tradeoffs, and references to the paper and DSPy implementation), read:

  • docs/mastra-rlm-technical-article.md

Exports

  • createRlmRunner(options)
  • createRlmTool(options)
  • createRlmWorkflow(options)
  • defaultSandboxAdapter

Release

From packages/mastra-rlm:

bun run typecheck
bun run build
bun run pack:dry
npm publish --access public

CI Release

This repo includes automated publish workflow at:

  • .github/workflows/release-mastra-rlm-kit.yml

Requirements:

  • Add repository secret NPM_TOKEN with publish permissions.
  • Push a tag in the format mastra-rlm-kit-vX.Y.Z matching packages/mastra-rlm/package.json version.

Example:

git tag mastra-rlm-kit-v0.1.0
git push origin mastra-rlm-kit-v0.1.0

Quick Start

import { createRlmTool } from "mastra-rlm-kit";
import { workspace } from "./workspace";

export const runRlmTool = createRlmTool({
  workspace,
  defaults: {
    rootModelId: "openrouter/moonshotai/kimi-k2.5",
    subModelId: "openrouter/minimax/minimax-m2.5",
    budgets: {
      maxIterations: 30,
      maxCalls: 50,
      maxDepth: 1,
      maxOutputChars: 10000,
    },
  },
});

Quick Start (Workflow)

import { createRlmWorkflow } from "mastra-rlm-kit";
import { workspace } from "./workspace";

export const rlmWorkflow = createRlmWorkflow({
  workspace,
  models: {
    root: { id: "openrouter/moonshotai/kimi-k2.5" },
    sub: { id: "openrouter/minimax/minimax-m2.5" },
  },
  defaults: {
    budgets: {
      maxIterations: 30,
      maxCalls: 50,
      maxDepth: 1,
      maxOutputChars: 10000,
    },
  }
});

Sandbox Adapter

If your project uses a custom sandbox shape, pass a custom adapter:

import type { RlmSandboxAdapter } from "mastra-rlm-kit";

const adapter: RlmSandboxAdapter = {
  resolveRootPath(workspace) {
    return "/custom/sandbox/root";
  },
  async executeCommand(workspace, command, args, options) {
    const result = await workspace.sandbox!.executeCommand(command, args, options);
    return {
      exitCode: result.exitCode,
      stdout: String(result.stdout ?? ""),
      stderr: String(result.stderr ?? ""),
    };
  },
};