Skip to content

feat: add blockrun_scrapecheck, verifying a held web value against its live source page - #104

Open
FieldmodeLLC wants to merge 1 commit into
BlockRunAI:mainfrom
FieldmodeLLC:add-scrapecheck-tool
Open

feat: add blockrun_scrapecheck, verifying a held web value against its live source page#104
FieldmodeLLC wants to merge 1 commit into
BlockRunAI:mainfrom
FieldmodeLLC:add-scrapecheck-tool

Conversation

@FieldmodeLLC

Copy link
Copy Markdown

Adds a typed structured tool (per the CONTRIBUTING design rule: two endpoints, fixed input contract, no long catalog) for ScrapeCheck (https://scrapecheck.fly.dev). The use case: an agent holds a value that came from somewhere else (a search result, a scraper, another tool) and needs to know it is on the source page right now before acting on it. ScrapeCheck re-fetches the page independently and returns an ed25519-signed pass/fail/unverifiable verdict. A claim is never certified unless the re-fetched page contains it, and anything unconfirmed is unverifiable, never pass. Verdicts verify offline against the published key, so the agent (or its user) doesn't have to trust the service at runtime.

This composes with tools you already ship: blockrun_exa finds, blockrun_scrapecheck confirms before the agent acts or pays on what it found.

What's in the diff:

  • src/tools/scrapecheck.ts: typed tool, two tiers (verify $0.01 base, presence $0.002 base, both plus tx fee via withTxFee), budget gate and recordSpending following exa.ts
  • registered in profiles (full and research), README tools row, count pins 20 to 21 (profiles tests, brand-numbers.json, hero badge and alt text)
  • typecheck, build, tests, and the stdio smoke test all run; the 4 Solana-wallet test failures on my machine reproduce identically on unmodified main (local wallet state), so they are environmental, not from this change

One dependency on your side, stated plainly: the tool calls /v1/scrapecheck/verify and /v1/scrapecheck/verify-presence, which need gateway routes forwarding to scrapecheck.fly.dev. Same shape as your Surf and Exa routes, with one difference that makes it easy: there is no API key on either side. ScrapeCheck speaks x402 v2 and is listed in the CDP Bazaar catalog; the gateway can settle per call to our Base treasury exactly as it does for Surf. The first 100 checks per client are free (header X-Use-Free-Allowance: yes), so your integration testing costs nothing. Happy to adjust the route shape, pricing presentation, or tool copy to whatever your gateway conventions need, or to hold this PR until the routes exist if you'd rather sequence it that way. Contact: sales@fieldmodesolutions.com.

…live source page

Typed structured tool per the CONTRIBUTING design rule (2 endpoints,
fixed input contract). ScrapeCheck independently re-fetches the page and
returns an ed25519-signed pass/fail/unverifiable verdict; a claim is
never certified unless the re-fetched page contains it. Tiers: verify
($0.01 base) and presence ($0.002 base), both + tx fee via withTxFee.
Registered in profiles (full + research), README tools row, count pins
bumped 20->21 (profiles tests, brand-numbers.json, badge + alt).

Gateway dependency stated in the PR description: routes
/v1/scrapecheck/verify(-presence) forward to scrapecheck.fly.dev, which
speaks x402 v2 with no API key on either side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant