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

verist

v0.2.0

Published

Deterministic workflow kernel for AI systems — replay + diff for AI decisions

Readme

Verist

npm version npm downloads Ask ChatGPT Twitter Follow

Deterministic workflow kernel for AI systems — replay + diff for AI decisions.

Update a prompt or model, recompute against past inputs, and see exactly what decisions would change before shipping. Human corrections survive recomputation by design.

Install

npm install verist zod

Quick Example

import { defineStep, run, recompute, formatDiff } from "verist";
import { z } from "zod";

const OutputSchema = z.object({ claims: z.array(z.string()) });

// v1: precise extraction
const extractV1 = defineStep({
  name: "extract-claims",
  input: z.object({ text: z.string() }),
  output: OutputSchema,
  run: async (input) => ({
    output: { claims: ["Revenue: $5M", "Headcount: 45"] },
  }),
});

const baseline = await run(extractV1, { text: "Revenue was $5M..." });

// v2: changed logic — what breaks?
const extractV2 = defineStep({
  name: "extract-claims",
  input: z.object({ text: z.string() }),
  output: OutputSchema,
  run: async (input) => ({
    output: { claims: ["Revenue was strong"] },
  }),
});

const result = await recompute(baseline.value, extractV2);
if (result.ok) {
  console.log(result.value.status); // "value_changed"
  console.log(formatDiff(result.value.outputDiff));
  // claims[0]: "Revenue: $5M" → "Revenue was strong"
  // - claims[1]: "Headcount: 45"
}

For LLM-powered steps, see @verist/llm which adds extract() and defineExtractionStep().

API

Steps

  • defineStep(config) — define a step with Zod input/output schemas and a run function
  • run(step, input, opts?) — execute a step, returns Result<StepResult, StepError>
  • runStep(params) — execute with explicit workflow context (ID, version, artifact capture)
  • fail(code, message, opts?) — return a structured error from a step (preserves error code and retryable flag)

Replay and Diff

  • recompute(baseline, step, opts?) — rerun a step against a previous result or snapshot, returns diff + status
  • compareSnapshots(before, after) — diff two snapshots directly
  • diff(a, b) — compute a diff between any two objects
  • formatDiff(diff) — human-readable diff output
  • applyDiff(target, diff) — apply a diff to produce a new object
  • createSnapshotFromResult(result) — capture a StepResult as an immutable snapshot

Workflows

  • defineWorkflow(config) — declare a workflow with named steps
  • createContextFactory(adapters) — create execution contexts with metadata and artifact capture

Commands

Steps can return commands that describe what should happen next:

  • invoke(step, input) — trigger another step
  • fanout(step, items) — trigger a step for each item
  • review(reason, payload?) — pause for human review
  • suspend(reason, opts?) — pause until external resume
  • emit(type, payload) — emit a domain event

Result Type

Errors are values, not exceptions:

const result = await run(step, input);
if (result.ok) {
  console.log(result.value.output);
} else {
  // "input_validation" | "output_validation" | "execution_failed" | custom codes via fail()
  console.log(result.error.code, result.error.retryable);
}

Recompute Status

recompute() classifies results for CI integration:

| Status | Meaning | | ------------------ | ------------------------------------------- | | clean | Output identical to baseline | | value_changed | Output differs (regression or improvement) | | schema_violation | New output fails baseline schema validation |

Packages

| Package | Description | | -------------------------------------------------------------------- | ---------------------------------------------- | | verist | Core kernel (this package) | | @verist/cli | CLI — verist init, capture, diff, test | | @verist/llm | LLM adapters (OpenAI, Anthropic) with tracing | | @verist/storage | Storage interface + in-memory store | | @verist/storage-pg | PostgreSQL adapter (Drizzle ORM) |

Documentation

License

Apache-2.0