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

@nexusbloom/core

v1.0.0

Published

The NexusBloom tool engine — type compatibility, pipelines, validation and sandboxed execution. Shared by the CLI, MCP server, VS Code extension and embed.

Readme

@nexusbloom/core

The NexusBloom tool engine. Type compatibility, pipeline composition, validation, and sandboxed execution — the parts of the platform that must behave identically no matter which surface is calling.

npm install @nexusbloom/core

Why this package exists

A tool's manifest is the contract. What accepts a value, what a conversion costs, whether two tools can be wired together — those rules are not presentation, and they cannot differ per surface.

Before this package, those rules lived inside the CLI. Any other surface — MCP, VS Code, embed — would have had to reimplement them, and the surfaces would slowly disagree about whether a string fits an integer field. That is the failure schema-first is supposed to prevent.

So the engine lives here, and the CLI is one consumer of it.

The boundary

In core: pure logic and the sandbox. No terminal, no prompts, no config.

| Module | What it is | |---|---| | types.js | Type inference, validation, compatibility rules | | values.js | $path accessors and transforms | | pipe.js | Parse, plan and run a pipeline | | pipelines.js | Saved pipeline files | | runs.js | Recorded runs (--trace) | | compile.js | Manifest source → callable coreLogic | | sandbox.js, runner.js | Disposable child-process execution | | jsonish.js | Lenient JSON parsing | | paths.js | XDG config and cache locations |

Not in core: anything that draws or prompts. renderPlan, describeOutput and the whole ui.js belong to the CLI, which is why pipe.js splits at the chalk boundary.

Usage

import { validateInput, compatibility, runPipeline } from "@nexusbloom/core";

Submodules are addressable when you only need one:

import { validateInput }  from "@nexusbloom/core/types";
import { runPipeline }    from "@nexusbloom/core/pipe";
import { execInSandbox }  from "@nexusbloom/core/sandbox";

Validating input

const { valid, errors, data } = validateInput(input, manifest.input_schema);
if (!valid) throw new Error(errors.join("; "));

Deciding whether two tools connect

const { level, note, suggestion } = compatibility("integer", ["number"]);
// → { level: "ok", note: "lossless widening" }

compatibility("string", ["integer"]);
// → { level: "lossy", ... }  — needs an explicit transform

This is the rule the whole pipeline design rests on: conversions that cannot lose information happen silently, conversions that can require a transform. $max → count just works; $text → count does not.

Running a pipeline

const steps = parsePipeline(["env-validator env_content=@in", "| base64-tool input=$result"]);
const plan  = await buildPlan(steps, getManifest);   // resolves wiring, reports problems
const out   = await runPipeline({ steps, getTool, execute, stdin });

buildPlan reports type errors before anything runs. runPipeline re-checks against real values, because declared schemas can be wrong.

Executing untrusted source

const { ok, result, error } = await execInSandbox({
  source: toolSource,
  input,
  timeoutMs: 5000,
});

A child process, killed with SIGKILL at the deadline. Promise.race cannot stop an infinite loop — the event loop never gets a turn — so a forkable process is the only thing that can.

This is isolation, not a security sandbox: the child runs with the same user and filesystem permissions as the host. Treat downloaded tool source as trusted-but-unverified, and prefer server-side execution for tools you do not control.

Consistency

Every surface imports this package rather than its own copy, so a change to a type rule or a pipeline lands once and every surface inherits it. If you find yourself copying logic out of here to use it, the logic probably belongs in here.

License

MIT