provable-think-verify
v0.1.0-alpha.1
Published
Standalone CLI for verifying provable-think audit-trail receipts. Runs an 11-step verification pipeline against a public-ledger anchor and an auditor's scoped viewing key.
Downloads
291
Maintainers
Readme
provable-think-verify
Standalone CLI for verifying provable-think audit-trail receipts.
Run
npx provable-think-verify --txid <id> --capability <key.json>11 steps. Signed report. Seconds.
What it does
Runs an 11-step verification pipeline:
- Fetch the receipt transaction from the public ledger.
- Parse the PRT1 receipt header for the commitment hash, sequence number, hook kind, and agent identity public key.
- Hit the operator's
/commit-infoendpoint for the matching envelope manifest. - Fetch the encrypted envelope from the operator's storage.
- Derive the per-event symmetric key via ECDH key exchange between the auditor's private key and the agent's public key.
- Decrypt the AEAD payload.
- Re-hash the recovered plaintext.
- Compare against the on-ledger commitment.
- Walk the previous-hash sequence to detect sequence gaps.
- Validate the public-ledger timestamp against the envelope's claimed timestamp.
- Sign the resulting report with the auditor's verifier key.
Three failure modes, all distinguishable
- Wrong key — AEAD silence; the verifier reports "out of scope or wrong capability."
- Tampered envelope — SHA-256 mismatch; ciphertext decrypts but the plaintext hash does not bind to the ledger commitment.
- Out-of-scope event — missing recipient row; no decryption is attempted.
The auditor cannot confuse "I am not authorized" with "the operator tampered."
Live demo
acme-health.pages.dev shows the verifier running in-browser against a real Cloudflare Workers AI agent emitting real receipts to a real public ledger. Click the red TAMPER button — watch step 10 flip red on AEAD failure.
License
MIT. Copyright (c) 2026 John Calhoun.
