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

@avee1234/truecall

v0.1.0

Published

Deterministic runtime post-condition verification for AI agent tool calls.

Readme

truecall

Deterministic runtime post-condition verification for AI agent tool calls.

When an agent's tool returns success but didn't actually change the world (the file wasn't written, the record wasn't saved), TrueCall catches it with a cheap deterministic check and hands the agent a structured correction — instead of letting a silent failure ship.

This is the zero-dependency core: the contract format and the verifier. For harness integration (Claude Code, Codex), see the adapters in the monorepo.

Install

npm install @avee1234/truecall

Zero runtime dependencies. Ships compiled ESM + type declarations; runs on Node 18+.

Use

Declare a contract — a cheap post-condition that confirms intent — and wrap your tool with it:

import { contract, wrapTool } from "@avee1234/truecall";

const createFile = wrapTool(
  contract({
    tool: "create_file",
    description: "a non-empty file exists at the requested path",
    post: { check: "file_exists", path: "{{args.path}}", minSize: 1 },
  }),
  realCreateFile, // your tool implementation
);

const r = await createFile({ path: "/tmp/out.txt", contents: "hi" });
if (!r.ok) {
  // r.signal: { expected, actual, message, remediation? } — feed it back to the agent
}

If realCreateFile returns { status: "success" } but never writes the file, r.ok is false and r.signal explains the silent failure.

Built-in checks (plus a custom escape hatch)

  • file_exists — a file/dir exists, optional minSize / contains
  • http — re-fetch a resource and assert status / a JSON field
  • shell — run a read-only probe, assert exit code / stdout
  • result — assert on the tool's own returned payload
  • verify — a custom async predicate for anything else

Verification is deterministic — there is no LLM-judge check type. If a verifier can't produce a verdict (throws, missing template path, timeout), TrueCall is fail-closed: it reports "could not verify," never a silent pass.

API

  • contract(def) — validate and build a contract (throws on an invalid definition).
  • validateContract(def): string[] — return validation errors (empty = valid).
  • runContract(contract, ctx): Promise<VerifyResult> — run a contract against { tool, args, result }.
  • runCheck(check, ctx) — run a single check.
  • wrapTool(contract, toolFn) — wrap a tool so its success is gated by the post-condition.

Full contract format: docs/spec.md.

License

MIT