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

@oiyonet/eval-harness

v1.0.0

Published

Deterministic, zero-dependency local evaluation & assertion harness for AI agent responses, tool calls, and structured outputs.

Readme

@oiyonet/eval-harness

Deterministic, zero-dependency local evaluation & assertion harness for AI agent responses, tool calls, and structured JSON outputs.

npm version License: MIT


Why agent-eval-harness?

Testing autonomous AI agent outputs with traditional assertions (assert.strictEqual) fails because natural language generation is non-deterministic. Conversely, using "LLM-as-a-judge" (calling GPT-4 or Claude to evaluate outputs) is slow (5-10 seconds per test), expensive, flakier, and introduces rate-limit bottlenecks in CI.

agent-eval-harness provides a sub-millisecond, zero-dependency deterministic evaluation suite:

  • Prompt Adherence & Text Rubrics: Checks required/forbidden keywords, any-of sets, length constraints, regex matching, Markdown header formatting, and fenced JSON.
  • Semantic JSON Validator: Ultra-light schema assertions (types, ranges, enums, array lengths, regex) without heavy validator dependencies.
  • Agent Tool Call Verifier: Ensures autonomous agents invoked the intended tool with valid, non-empty arguments.
  • Dual CLI & MCP: Run evaluations in CI via agent-eval or allow agents to self-evaluate in test-driven agent workflows via agent-eval-mcp.

1. Quick Start (CLI)

# Evaluate agent text output against a rubric
npx agent-eval check --text "summary.md" --rubric "rubric.json"

# Validate structured JSON response from an LLM
npx agent-eval json --data "result.json" --schema "schema.json"

2. MCP Server Configuration

Add agent-eval-mcp to your agent configuration (~/.claude/settings.json, Cursor MCP settings, or Antigravity config):

{
  "mcpServers": {
    "eval-harness": {
      "command": "npx",
      "args": ["-y", "agent-eval-harness"]
    }
  }
}

Available MCP Tools:

  1. evaluate_text_quality
    • Evaluates text against prompt rubric rules (required/forbidden keywords, length bounds, regex, formatting).
  2. evaluate_semantic_json
    • Validates agent structured JSON outputs against schema rules.
  3. evaluate_tool_call
    • Validates whether an agent selected the expected tool and provided valid argument types.

3. Programmatic Usage (Node.js / TypeScript)

import {
  evaluateTextQuality,
  evaluateSemanticJson,
  evaluateToolCall,
} from 'agent-eval-harness';

// 1. Text Rubric Evaluation
const agentResponse = `
## Executive Summary
The security audit passed with zero vulnerabilities detected in the repository.
`;

const rubricReport = evaluateTextQuality(agentResponse, {
  requiredKeywords: ['security audit', 'vulnerabilities'],
  forbiddenKeywords: ['hallucination', 'bypass'],
  minLength: 30,
  requireMarkdownHeaders: true,
});

console.log('Passed:', rubricReport.pass); // true
console.log('Score:', rubricReport.score); // 100

// 2. Structured JSON Evaluation
const jsonReport = evaluateSemanticJson(
  { score: 98, status: 'approved' },
  {
    required: ['score', 'status'],
    properties: {
      score: { type: 'number', min: 0, max: 100 },
      status: { type: 'string', enum: ['approved', 'rejected'] },
    },
  }
);
console.log('JSON Valid:', jsonReport.pass); // true

// 3. Tool Call Assertion
const toolReport = evaluateToolCall(
  { name: 'create_issue', arguments: { title: 'Bug fix' } },
  {
    expectedTool: 'create_issue',
    requiredArgs: ['title'],
  }
);
console.log('Tool Call Correct:', toolReport.pass); // true

License

MIT © OIYO Lab