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

@rsconcept/rstool

v0.8.1

Published

Agent-facing library for incremental RSForm construction, RSLang analysis, diagnostics, modeling, and evaluation. Wraps @rsconcept/domain with a deterministic session contract and stdio wrapper.

Readme

@rsconcept/rstool

Agent-facing library for incremental RSForm construction, RSLang expression analysis, diagnostics, modeling, and evaluation. It wraps @rsconcept/domain with a deterministic session contract and a stdio JSON wrapper that LLM agents and MCP clients can call directly.

Agent skill

RS language + rstool workflows for agents: skills/rstool-helper/ (GUIDE.md, REFERENCE.md, EXAMPLES.md) and docs/ (DOMAIN.md, CONCEPTUAL-SCHEMA.md, SYNTAX.md, …). A thin entry skill is installed into the project’s agent skills folder; see Installing the agent skill below.

Install

npm install @rsconcept/rstool

@rsconcept/domain is a peer-of-dependency installed automatically.

Installing the agent skill

After npm install @rsconcept/rstool, you do not copy files yourself. Ask your agent, for example:

Install the rstool agent skill according to the package instructions.

The agent should read and follow:

node_modules/@rsconcept/rstool/skills/INSTALL.md

That copies skills/rstool-helper/SKILL.md from the package into your host’s project skills directory (for example .agents/skills/rstool-helper/SKILL.md). Full guidance stays in the package (skills/rstool-helper/GUIDE.md, docs/*.md) and is read from node_modules when needed.

Details: skills/README.md.

Quick use (library)

import { CstType, RSToolAgent } from '@rsconcept/rstool';

const tool = new RSToolAgent();
const session = tool.createSession();
const result = tool.analyzeExpression(session.sessionId, {
  expression: '1+2',
  cstType: CstType.TERM
});

Quick use (stdio wrapper)

npx rstool-wrapper      # one JSON request per line on stdin, one JSON response per line on stdout

Or run it as a child process from your own code:

import { RSToolWrapperClient } from '@rsconcept/rstool/wrapper';

const client = new RSToolWrapperClient(); // spawns `rstool-wrapper` by default
await client.waitUntilReady();
const session = await client.call<{ sessionId: string }>('createSession');
await client.close();

Scope

  • Session-based incremental editing of constituents.
  • Parse / syntax / semantic / type analysis for expressions.
  • In-memory modeling: set base bindings and structured values; evaluate expressions and constituents.
  • Deterministic diagnostics and export/import for reproducible agent workflows.

Publishing

Maintainers: see PUBLISHING.md for npm release steps.

Repo scripts

From rsconcept/rstool (or run powershell -File scripts/dev/LocalDevSetup.ps1 from the repo root on Windows):

  • npm install / npm ci
  • npm run typecheck
  • npm test
  • npm run build — produce dist/ via tsdown
  • npm run wrapper — dev stdio wrapper via tsx
  • npm run example:client, npm run example:build-schema, npm run example:build-rsmodel — полный список example:* и kinship:cli в examples/README.md

Stdio protocol

  • Input: one JSON request per line.
  • Output: one JSON response per line.
  • The wrapper keeps state in memory while the process is alive.
  • On startup, a ready handshake is printed.

Supported methods (current contract version: see CONTRACT_VERSION):

  • ping
  • methods
  • createSession
  • addOrUpdateConstituenta
  • analyzeExpression
  • getFormState
  • listDiagnostics
  • commitStep
  • exportSession
  • exportPortalSchema
  • exportPortalModel
  • importSession
  • setConstituentaValue
  • setConstituentaValues
  • clearConstituentaValues
  • getModelState
  • evaluateExpression
  • evaluateConstituenta
  • recalculateModel

Example request:

{ "id": "1", "method": "createSession", "params": {} }

Example response:

{ "id": "1", "ok": true, "result": { "sessionId": "...", "contractVersion": "1.4.0" } }

Typed client example

Run:

npm run example:client

File: examples/agent-client.ts

The example:

  • starts the stdio wrapper as a child process
  • waits for the ready handshake
  • creates a session
  • upserts a constituent
  • runs expression analysis
  • sets a base binding and evaluates a term
  • fetches diagnostics

License

MIT