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

@post-print/agent-test

v0.3.4

Published

Direct-agent scenario runner and CLI for agent-spec suites

Readme

@post-print/agent-test

Source of truth for the direct-agent test package.

Scenario runner for real Cursor and Claude agents, built on @post-print/agent-harness.

Deprecated and removed: stored-trace replay is not an agent test. host: "replay", replayTrace, --record-fixtures, and the old --live mode flag are rejected with migration guidance. Every scenario execution now launches Cursor or Claude and can incur provider usage.

Direct TypeScript API

runAgentTest is the execution core. JSON suites load into this same function.

import { runAgentTest } from "@post-print/agent-test";

const result = await runAgentTest({
  cwd: process.cwd(),
  scenario: {
    name: "uses the project instructions",
    prompt: "Review the current change.",
    rubric: { mustReadPath: ["AGENTS.md"] },
  },
});

The default host is Cursor. Set scenario.host: "claude", defaults.host, or the top-level host option for Claude. The scenario host wins over the top-level override, which wins over suite defaults. The default suite name is direct; worktree isolation, judging, timeout enforcement, and announce-stop retry are enabled by default.

JSON suites and CLI

JSON is an authoring adapter, not a stored answer. Consumer repositories can keep suites under agent-suites/<suite>/scenarios.json:

{
  "name": "routing",
  "defaults": { "host": "cursor", "profile": "cursor" },
  "scenarios": [
    {
      "name": "reads instructions",
      "prompt": "Review the current change.",
      "rubric": { "mustReadPath": ["AGENTS.md"] }
    }
  ]
}

Run Cursor by default or select Claude explicitly:

npx agent-test --suites-dir agent-suites
npx agent-test --suites-dir agent-suites --suite routing
npx agent-test --suites-dir agent-suites --host claude
npx agent-test --doctor

Direct runs require an exported CURSOR_API_KEY for Cursor or ANTHROPIC_API_KEY plus the Claude Code CLI for Claude. Judge criteria use CURSOR_API_KEY unless --no-judge is set. The CLI does not load .env.

The old --live flag is removed because direct execution is now the only execution mode. Direct runs capture transient traces automatically; use --keep-recordings or --debug to retain diagnostics.

Validation, rubrics, and comparison

These commands inspect configuration or existing reports; they do not claim to execute an agent:

npx agent-test --validate-only --validate-paths --suites-dir agent-suites
npx agent-test --validate-seeds --suites-dir agent-suites
npx agent-test --compare-pairs clean:changed --out-dir "$TMPDIR/compare"
npx agent-test compare --a clean.suite-report.json --b changed.suite-report.json --out-dir "$TMPDIR/compare"

scenarios.json may omit inline rubric keys when they are supplied by sibling rubrics.json / scenarios.rubric.json, or by --rubrics-dir <path> at <path>/<suite>/rubrics.json. External rubric entries replace the inline rubric for the same scenario.

Reports pair scenarios by compareId when present, otherwise by normalized scenario name. JSON, Markdown, and HTML reports include outcomes, token usage, duration, tools, and grounding signals.

Isolation and diagnostics

Each scenario uses a detached git worktree by default. This isolates edits, but it does not prevent a local host from reading the IDE-open caller checkout. Keep answer keys outside agent-visible roots when that distinction matters.

--debug retains an evidence bundle under $TMPDIR/agent-spec/sessions/<id>/ by default. It includes the transcript, scenario, result, trace, failures, environment metadata, judge details, and an exact direct-run rerun command. Use --debug-dir to override the parent directory.

Ctrl+C cancels active Cursor/Claude work and cleans worktrees. --no-worktree requires AGENT_TEST_ALLOW_IN_PLACE=1 because agent edits will persist in the caller checkout.

Dialogue-first skills must be tested with a one-shot prompt or an intentional --allow-user-input run. Do not weaken the production skill to make a headless test pass.

MCP servers

Cursor and Claude scenarios can attach inline stdio or HTTP/SSE MCP servers through suite defaults or scenario overrides. Scenario server names replace matching defaults. ${ENV_VAR} placeholders resolve at run time. Ambient project/user MCP configuration is not loaded.

In-repo package checks

The repository does not run paid agents in its default CI package-integrity checks:

bun run build
node packages/test/dist/cli.js --validate-only --suites-dir packages/test/fixtures --suite smoke
node packages/test/dist/cli.js --doctor

Credentialed acceptance requires one TypeScript runAgentTest call and one JSON-suite CLI run against a real host.