Verify a single Ed25519-signed receipt file against the signer's public key. Returns exit 0 if valid, 1 if tampered, 2 if malformed or the key is missing.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-agents-877c59882848 ,按照其中的说明把「verify-receipt」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Verify an Ed25519 signed receipt produced by protect-mcp with
@veritasacta/verify from npm. The check itself makes no network requests
and needs no vendor lookup. npx downloads @veritasacta/verify@0.9.2 the first time it runs. For an
offline machine, install it in the project first with
npm install --no-save @veritasacta/verify@0.9.2, and npx then runs the
local copy without network access.
/verify-receipt ./receipt.json
protect-mcp 0.7.4 appends receipts to ./receipts/receipts.jsonl, one per
line. Save one line to its own file first, e.g., the newest one with
tail -n 1 ./receipts/receipts.jsonl > receipt.json. Use /audit-chain to
verify the whole file.
publicKey
value in ./protect-mcp.key (the receipt does not hold a key)Run this in a shell:
PUB="${2:-$(node -p 'JSON.parse(require("fs").readFileSync("./protect-mcp.key")).publicKey')}"
npx @veritasacta/verify@0.9.2 "$1" --key "$PUB"
Where $1 is the receipt path provided by the user, and $2 is an optional
public key in hex.
| Exit | Meaning | Action |
|---|---|---|
| 0 | Valid receipt, signature verified | Report: "Verified. Receipt authentic." |
| 1 | Signature mismatch — receipt tampered | Report: "TAMPERED. Signature does not match payload." |
| 2 | Malformed receipt or missing key | Report: "Undecidable. The receipt is malformed or no public key was given." |
For a valid receipt:
Verified ✓
Request: tu-1790427588265-c8x5
Tool: Read
Decision: allow
Signed at: 2026-09-26T12:59:48.265Z
Key ID: generated
For a tampered receipt:
TAMPERED ✗
The signature does not match the payload. This receipt has been modified
since it was signed.
Request ID: tu-1790427588265-c8x5
Checked against key: 0faf558a90dfbf88...
Possible causes:
- A field was edited after signing (most common)
- The signature was copied from a different receipt
- The wrong public key was given
Compare this receipt against a known-good copy to identify the altered field.
For a malformed receipt:
MALFORMED ✗
The file is not a valid Veritas Acta receipt. Missing or invalid fields:
<list the specific structural issues>
A protect-mcp 0.7.4 receipt includes: v, type, algorithm, kid, issuer,
issued_at, payload, signature.
/audit-chain to verify ./receipts/receipts.jsonl