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

@thoughtproof/goat-plugin

v0.2.0

Published

ThoughtProof verification plugin for GOAT AgentKit - epistemic verification for AI agents

Readme

ThoughtProof Plugin

Epistemic verification for AI agents — catch bad reasoning before it costs money.

Why

Autonomous agents hallucinate, drift from instructions, and make unsupported logical leaps. When agents control wallets, one bad output costs more than thousands of verification checks. ThoughtProof adds a verification layer between "agent decided" and "transaction sent."

Two products, one flow:

  • Sentinel — fast pre-execution triage (~$0.008, ~1-2s). Call on every decision.
  • RV — adversarial deep verification (~$0.02–0.08, 5–45s). Call when Sentinel is uncertain or stakes are high.

Actions

| Action | Purpose | Risk | Cost | Latency | |--------|---------|------|------|---------| | thoughtproof.sentinel | Pre-execution check (ALLOW / BLOCK / UNCERTAIN) | read | ~$0.008 | ~1-2s | | thoughtproof.verify | Adversarial reality verification (evaluate → critique → synthesize) | read | $0.02–0.08 | 5–45s | | thoughtproof.attest | On-chain attestation (EAS for Sentinel, TP-VC for RV) | medium | gas | ~10s | | thoughtproof.status | Health check both APIs | read | free | <1s |

Agent Decision Flow

Agent decides action
  │
  ├─► thoughtproof.sentinel (every decision, ~$0.008, standard cascade)
  │     ├── ALLOW     → Execute
  │     ├── BLOCK     → Stop
  │     └── UNCERTAIN → Escalate ─┐
  │                                │
  └───────────────────────────────►│
                                   │
  thoughtproof.verify (tier: standard|deep)
        ├── ALLOW  → Execute
        └── BLOCK  → Stop

Install

npm install @thoughtproof/goat-plugin
# peer dependency
npm install @goatnetwork/agentkit

Setup

Two auth modes — choose one:

Option A: API Key (simple)

import { HttpThoughtProofAdapter } from '@thoughtproof/goat-plugin';

const adapter = new HttpThoughtProofAdapter({
  apiKey: process.env.THOUGHTPROOF_API_KEY,
});

Option B: x402 Pay-per-call (no API key, agent wallet pays)

import { privateKeyToAccount } from 'viem/accounts';
import { HttpThoughtProofAdapter } from '@thoughtproof/goat-plugin';

const adapter = new HttpThoughtProofAdapter({
  x402Signer: privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`),
});

The server dictates the price via the PAYMENT-REQUIRED header. The adapter signs and pays automatically. No hardcoded prices, no subscription — pure pay-per-use.

Option C: Pre-configured x402 fetch (advanced)

If you've already wired up @x402/fetch:

import { wrapFetchWithPayment } from '@x402/fetch';
import { x402Client } from '@x402/core/client';
import { ExactEvmScheme } from '@x402/evm/exact/client';

const client = new x402Client();
client.register('eip155:*', new ExactEvmScheme(signer));

const adapter = new HttpThoughtProofAdapter({
  x402Fetch: wrapFetchWithPayment(fetch, client),
});

Register Actions

import { ActionProvider } from '@goatnetwork/agentkit/providers';
import {
  thoughtproofSentinelAction,
  thoughtproofVerifyAction,
  thoughtproofAttestAction,
  thoughtproofStatusAction,
} from '@thoughtproof/goat-plugin';

const provider = new ActionProvider();
provider.register(thoughtproofSentinelAction(adapter));
provider.register(thoughtproofVerifyAction(adapter));
provider.register(thoughtproofAttestAction(adapter));
provider.register(thoughtproofStatusAction(adapter));

Demo

Run the included demo agent that tests three scenarios (safe trade, risky trade, ambiguous signal):

npx tsx examples/thoughtproof-verification/index.ts

Expected output:

🐐 ThoughtProof × GOAT AgentKit — Verification Demo
   Sentinel (triage) → RV (deep verification) escalation flow

═══════════════════════════════════════════════════════════════
  Health Check
═══════════════════════════════════════════════════════════════
  Sentinel: ✅ healthy (142ms)
  RV:       ✅ healthy (305ms)

═══════════════════════════════════════════════════════════════
  Scenario 1: Safe trade — clear signal
═══════════════════════════════════════════════════════════════
  Expected: Should ALLOW — clear reasoning, within risk parameters

  → Running Sentinel pre-check...
  ✅ [Sentinel] ALLOW (confidence: 0.94, 1847ms)
     └─ Reasoning is sound and within stated parameters

  📋 Final Decision:
     Verdict: ALLOW
     Decided by: sentinel
     → Agent would EXECUTE the trade

═══════════════════════════════════════════════════════════════
  Scenario 2: Risky trade — reasoning gaps
═══════════════════════════════════════════════════════════════
  Expected: Should BLOCK — violates position limits, speculative

  → Running Sentinel pre-check...
  🛑 [Sentinel] BLOCK (confidence: 0.97, 1203ms)
     └─ Violates position size limit (50 ETH > 1 ETH max)
     └─ No technical analysis provided

  📋 Final Decision:
     Verdict: BLOCK
     Decided by: sentinel
     → Agent would SKIP the trade

═══════════════════════════════════════════════════════════════
  Scenario 3: Ambiguous — needs deeper analysis
═══════════════════════════════════════════════════════════════
  Expected: May trigger UNCERTAIN → RV escalation

  → Running Sentinel pre-check...
  ⚠️  [Sentinel] UNCERTAIN (confidence: 0.52, 1654ms)
     └─ Correlation analysis methodology unclear

  → Sentinel UNCERTAIN — escalating to RV deep verification...
  ✅ [RV] ALLOW (confidence: 0.71, 9234ms)
     └─ Synthesis: Correlation is plausible but weak. Position size conservative...

  📋 Final Decision:
     Verdict: ALLOW
     Decided by: rv
     → Agent would EXECUTE the trade

ERC-8004 Reputation

Verification results are submitted as ERC-8004 reputation feedback automatically via an internal hook — not as an agent-callable action. This prevents agents from self-scoring.

Score mapping: ALLOW → 100, UNCERTAIN → 50, BLOCK → 0.

Tests

npx vitest run tests/unit/thoughtproof.test.ts

30+ tests covering all 4 actions, x402 payment flow, and reputation hook (metadata, execute, signal propagation, error handling, verdict mapping).

Architecture

plugins/thoughtproof/
├── actions/
│   ├── sentinel.ts          # Pre-execution triage
│   ├── verify.ts            # Adversarial RV verification (tier: standard|deep)
│   ├── attest.ts            # On-chain attestation (source: sentinel|rv)
│   └── status.ts            # Health check
├── adapters/
│   ├── types.ts             # Shared types + adapter interface
│   └── http-thoughtproof.ts # HTTP client for Sentinel + RV APIs
├── hooks/
│   └── reputation.ts        # Internal ERC-8004 reputation hook
└── index.ts                 # Plugin exports

Links