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

@lwrf42/emerge-eval-terminal-bench

v0.1.0

Published

Terminal-Bench task runner: task loader, session builder, blueprint, acceptance runner, and CLI for the emerge harness.

Downloads

93

Readme

@lwrf42/emerge-eval-terminal-bench

Terminal-Bench task runner for the emerge agent harness. Provides:

  • Task loader — parse and materialize TaskSpec YAML/JSON files
  • Session builder — wire Kernel + tools + adjudicator for eval runs
  • Blueprint — one-call session setup with sensible defaults
  • Acceptance runner — run acceptance commands and produce verdicts
  • CLIemerge-tbench run <task.yaml> for local task execution

v0.1.0 — early. Real-model verified against gpt-5.4 with Docker and inproc sandboxes — see VERIFICATION.md.

Install

npm install @lwrf42/emerge-eval-terminal-bench

Or run without installing:

npx @lwrf42/emerge-eval-terminal-bench run task.yaml --sandbox inproc

Import

import {
  loadTask,
  materializeTask,
  runAcceptance,
  makeTerminalBenchBlueprint,
} from "@lwrf42/emerge-eval-terminal-bench";

Task spec format

Tasks are YAML (or JSON) files matching the TaskSpec schema:

id: my-task-001
title: Fix the broken function
repo:
  kind: inline
  files:
    src/util.py: |
      def add(a, b):
          return a - b   # BUG
    tests/test_util.py: |
      from src.util import add
      def test_add():
          assert add(1, 2) == 3
goal: Fix the add() function so pytest tests/ passes.
acceptanceCommand: python3 -m pytest tests/ -x -q
timeoutSeconds: 60
difficulty: trivial

Supported repo.kind values:

  • inline — files are embedded in the spec; materialized to a temp directory
  • git — spec contains url and optional ref; materialized via git clone

Blueprint usage

import { loadTask, makeTerminalBenchBlueprint } from "@lwrf42/emerge-eval-terminal-bench";
import { AnthropicProvider } from "@lwrf42/emerge-provider-anthropic";

const task = (await loadTask("task.yaml")).value;
const provider = new AnthropicProvider(process.env.ANTHROPIC_API_KEY);

const { session, agentSpec } = makeTerminalBenchBlueprint({
  spec: task.spec,
  workspaceRoot: task.workspaceRoot,
  provider,
  sandboxMode: "inproc",  // or "harbor" for Docker isolation
});

const handle = (await session.kernel.spawn(agentSpec)).value;
await session.kernel.runAgent(handle);

session.stopAdjudicatorWatch();
await session.kernel.endSession();
await task.cleanup();

Tool permissions in eval context

The makeFsWriteTool and makeBashTool ship with permission.defaultMode: "ask" — appropriate for interactive sessions where a human approves writes. In eval context the session builder wraps all tools with defaultMode: "auto" so the agent-runner passes through to the sandbox immediately. The sandbox policy (InProcSandbox or HarborSandbox) remains the real authorization gate.

CLI

emerge-tbench run <task.yaml> [--sandbox inproc|harbor] [--image IMAGE]

Exit codes: 0 = aligned verdict, 1 = failed/partial, 2 = spec error.

Sandbox modes

| Mode | Sandbox | Isolation | Use case | |------|---------|-----------|----------| | inproc | InProcSandbox | Process-level | Fast local testing, CI | | harbor | HarborSandbox | Docker container | Strong isolation, benchmarking |

Exports

// Task loading
export { loadTask, materializeTask, parseTaskSpec } from "./task-loader.js";
export type { TaskSpec, LoadedTask } from "./task-loader.js";

// Session wiring
export { buildSession } from "./session-builder.js";
export type { BuiltSession, SessionBuilderOptions, SandboxMode } from "./session-builder.js";

// Blueprint
export { makeTerminalBenchBlueprint } from "./blueprint.js";
export type { TerminalBenchBlueprint, TerminalBenchBlueprintOptions } from "./blueprint.js";

// Acceptance
export { runAcceptance, makeAcceptanceEvaluator } from "./acceptance-runner.js";
export type { AcceptanceResult } from "./acceptance-runner.js";