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

@zoeyx/nocap

v0.1.0

Published

Is your AI agent capping? nocap runs the receipt and finds out if its 'done' claim is true — a lie detector for AI coding agents. Receipts over self-report.

Readme

nocap 🧢→✅

你的 AI agent 说"做完了"。nocap 跑一遍验收,查出它是不是在撒谎。

给 AI coding agent 用的测谎仪。它亲自跑你的检查,让真实的退出码否决 agent 的自述——PROVEN ✅(证明)还是 OVERCLAIM ❌(谎报)。

收据 > 自述

npm version license node


nocap(英文俚语 "no cap"):"没撒谎、说真的"。一个 agent 在 "capping"(撒谎)就是它声称完成了其实没做完的事。nocap 就是来抓这个的。

它解决什么

AI coding agent(Cursor、Claude Code、Cline、Aider、Windsurf、Continue……)有一个讨人厌的毛病:爱过度声称。它会说"bug 修好了,测试都过了 ✅",实际测试没跑、构建是坏的、文件根本没改。你信了,合并,然后搞挂线上。

nocap 就是那张收据。它不信 agent 说的,而是亲自跑检查,然后判定这个声称是 PROVEN(证明)还是 OVERCLAIM(谎报)。

🤖 Agent: 我实现了邮箱校验,写了测试。所有测试都过了 ✅,完成。

$ nocap demo

  🤖 agent 声称: "implemented email validation — all tests pass ✅"
  🔬 nocap 正在跑验收…
    ✗ email-validation   node check.js   exit 1

  ┌────────────────────────────────────────────────────────┐
  │  ❌ OVERCLAIM                                          │
  │  这个声称没有被收据证明                                │
  └────────────────────────────────────────────────────────┘

  收据显示:
    FAIL garbage string rejected: expected false, got true

  → 你的 agent 在 capping(撒谎)?🧢

快速上手

零安装、零配置,现在就试:

npx @zoeyx/nocap demo

验证单条命令(退出码 0 → PROVEN,其他 → OVERCLAIM):

npx @zoeyx/nocap verify "npm test" --claim "bug 修好了,测试过了"
# 真实退出码为 0 则退出 0,谎报则退出 1

声明一个声称,然后检查它

在仓库根目录建一个 .nocap.yml(或跑 npx @zoeyx/nocap init):

claim: "登录表单能校验邮箱并显示错误"
verify:
  - id: unit-tests
    run: "npm test"
  - id: build
    run: "npm run build"

然后:

npx @zoeyx/nocap check

nocap 亲自跑每一条 verify,然后裁决:全绿 → PROVEN,有一条红 → OVERCLAIM。agent 说什么都不算,只有收据算。

到处都用得上

CI —— GitHub Action

# .github/workflows/nocap.yml
on: [pull_request]
jobs:
  nocap:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npm ci
      - uses: zhouyuanxinand/nocap@v1
        with:
          command: check

OVERCLAIM 时检查失败(非零退出),撒谎的 agent 过不了 PR。

Git hook —— 阻止推送

npx @zoeyx/nocap hook install

装一个 pre-push hook,它会跑 nocap check,只要有一条 verify 是红的就阻止推送。用 nocap hook uninstall 卸载。

机器可读输出

nocap --json check
{
  "verdict": "PROVEN",
  "claim": "登录表单能校验邮箱并显示错误",
  "steps": [
    { "id": "unit-tests", "command": "npm test", "exitCode": 0, "provenance": "harness" }
  ]
}

原理(就一个想法)

nocap 把一个原则——收据 > 自述——蒸馏成一个极小的 CLI:

  • 自述(observation):agent 说的("做完了""测试过了")。
  • 收据(receipt):nocap 亲自跑的命令,带真实退出码和输出哈希。
  • 只有收据能证明一个声称。agent 不能自己批准自己。

就这样。没有提示词、没有模型、没有理论——只有一个确定性检查,它的退出码就是裁决。agent 爱声称什么就声称什么,nocap 跑证明。

好奇的话:收据会落在 .nocap/runs/<id>/receipts/,带 stdout/stderr 的 SHA-256,事后可以复核(防篡改)。

命令一览

| 命令 | 作用 | |---|---| | nocap demo | 自包含的"抓 agent 撒谎"场景,无需配置 | | nocap verify "<cmd>" | 跑一条命令并裁决 | | nocap check | 读 .nocap.yml,跑所有 verify,裁决 | | nocap init | 生成 .nocap.yml(自动探测你的测试命令) | | nocap hook install / uninstall | 管理 pre-push git hook | | --json | 机器可读输出(任何命令) |

退出码:PROVEN → 0,OVERCLAIM → 1,用法错误 → 2。

兼容所有 AI coding agent

nocap 不绑模型、不绑宿主。它不在乎是哪个 agent 写的代码——Cursor、Claude Code、Cline、Aider、Windsurf、Continue、GitHub Copilot Workspace,或你自己的。只要它会谎报"做完了",nocap 就能抓。

安装

npm install -g @zoeyx/nocap        # 全局
# 或临时用:
npx @zoeyx/nocap check

要求 Node ≥ 18。

跟同类有啥不同

| | 检查什么 | 怎么裁决 | |---|---|---| | nocap | agent 的完成声称 | 重跑收据(真实退出码) | | Guardrails AI / NeMo | LLM 的输出内容 | 校验生成的文本 | | OpenAI Evals / promptfoo | 模型的质量(离线) | 给数据集打分 | | Langfuse / Opik | agent 的轨迹 | 只观察,不裁决 |

nocap 是唯一专门回答一个问题的:agent 到底有没有做完它说做完的事?

致谢

"收据 > 自述"这个想法受 agent-governance(MIT)启发——那是一套更深的治理协议。nocap 是它核心检查的精简、模型无关、30 秒上手版本。

许可

MIT