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

@plexusone/structured-evaluation

v0.14.0

Published

Zod schemas and TypeScript types for structured-evaluation's LLM-as-Judge report types (Rubric, RubricSet, Claims, Summary), generated from the Go structs' canonical JSON Schema.

Readme

@plexusone/structured-evaluation

Zod schemas and TypeScript types for structured-evaluation's LLM-as-Judge report types — Rubric, RubricSet, ClaimsReport, SummaryReport — generated from the same Go structs' canonical JSON Schema the Go library itself embeds. The Go structs are the source of truth; this package is downstream of them, never hand-maintained.

Why this exists

A hand-maintained TypeScript mirror of a Go report type drifts silently: a renamed field (intScore vs. the guessed scoreV2), a type mismatch (score is a "pass"|"partial"|"fail" string, not an int), or a restructured field (decision became an object, not a bare string) compiles fine on both sides and fails at runtime — or worse, doesn't fail at all, it just silently produces undefined. This package makes that class of bug a zod.parse() error instead.

Usage

npm install @plexusone/structured-evaluation
import { RubricSchema, type Rubric } from '@plexusone/structured-evaluation'

const report: Rubric = RubricSchema.parse(JSON.parse(rawJson))
console.log(report.intScore) // the 1-5 score, correctly typed
console.log(report.categories[0].severity) // "critical" | "high" | "medium" | "low" | "info" | undefined

Every object schema is .strict() — an unrecognized key (e.g. a stale consumer still expecting a field that was renamed upstream) fails parsing loudly instead of being silently dropped.

Claims

import { ClaimsReportSchema, type ClaimsReport } from '@plexusone/structured-evaluation'

const report: ClaimsReport = ClaimsReportSchema.parse(JSON.parse(rawJson))

for (const claim of report.claims ?? []) {
  if (claim.validation?.external?.sourceType === 'aggregator') {
    // Sourced from a stats-roundup site with no original reporting —
    // rejected by default even if the excerpt matches verbatim.
    continue
  }
  if (claim.statistical) {
    // Structured value/unit/precision/as-of-date, independent of the
    // rendered claim.text (e.g. "4.7M paid subscribers").
    console.log(claim.statistical.value, claim.statistical.unit, claim.statistical.precision)
  }
}

Regenerating

# 1. From the repo root: regenerate the Go-side JSON Schema after any
#    change to rubric.Rubric, rubric.RubricSet, claims.ClaimsReport, or
#    summary.SummaryReport.
go run ./cmd/genschema schema/

# 2. From ts/: regenerate the Zod schemas from that JSON Schema.
npm run generate

# 3. Rebuild and verify against real Go-generated output.
npm test

Never hand-edit src/generated/*.ts — it's regenerated wholesale from ../schema/*.schema.json by scripts/generate.mjs.

Known limitation

The JSON Schema currently declares no required fields (no Go struct has a jsonschema:"required" tag), so every field here is .optional() — a missing field validates successfully instead of failing. This does not affect the bug class this package exists to prevent (wrong names, wrong types, restructured shapes — all caught), but it means an accidentally omitted field won't be caught either. See test/rubric.test.mjs's regression-guard test for what's covered today.

Versioning

This package's version tracks the Go module's version — use the same version number here as the structured-evaluation Go module you're consuming reports from (e.g. Go v0.12.0 → @plexusone/structured-evaluation v0.12.0).