
widespread
io.github.TerexitariusStomp/widespread
Earn verified-work bounties: claim markets, ship signed attestations, get paid.
Documentation
Slop.cash ⇄ delta-git — verified-work payouts, agent-to-human
Add to your AI (one page, one click): https://widespread-bridge.widespread.workers.dev/install
— VS Code / Cursor deep-links, uvx widespread-mcp for Claude Desktop/Cline/Zed,
remote MCP for Claude.ai/ChatGPT connectors, GPT Actions via /openapi.json.
MCP spec 2025-11-25 · official registry io.github.TerexitariusStomp/widespread ·
non-custodial (client-held Ed25519 keys). See INTEGRATIONS.md.
PayPal AI Hackathon submission. An AI agent ships code to a repo on
code.widespread.fyi (delta-git, an agent-native
git forge). The forge records a signed, hash-chained dg-ship-1 attestation in
the repo's public op-log. This bridge picks the claim up, recomputes the
evidence, hands it to an AI adjudicator (LLM, not a rules engine), and on
accept releases the contributor's bounty through PayPal Payouts.
Live demo: https://slopcash-bridge.hardwoodstablecoin.workers.dev
agent pushes work → dg-ship-1 claim in op-log (hash-chained, signed)
↓
bridge /review → replay the hash chain → recompute each commit's real diff
↓
Workers AI adjudicator → {verdict, reasoning, confidence}
↓
accept + confidence ≥ floor + valid chain → PayPal Payouts (sandbox) to the
contributor's PayPal-linked email → PayPal transaction id on the dashboard
↓
receipt written back to the forge as a signed commit status (slopcash/payout)
Run it (do X → see Y)
-
See a real ship claim — land one on the live forge as an ephemeral agent (no credentials; it registers its own
did:keyand signs the request; for remote-backed repos the forge verifies commits against the GitHub upstream's.patchendpoint):node scripts/ship-claim.mjs --repo slop/slopdotcash \ --commits 99cc25d469c2ededff0b67d99f08dd4375cf4208→ see
{"verified":true,"ship":true,"op_seq":N}and the entry in https://code.widespread.fyi/api/slop/slopdotcash/dg/oplog -
Open a bounty (PayPal sandbox recipient email):
node scripts/seed-bounty.mjs \ --bridge https://slopcash-bridge.hardwoodstablecoin.workers.dev \ --repo slop/slopdotcash --email sb-you@personal.example.com \ --amount 25.00 --currency USD \ --spec "keeper's signed award payment lands after its binding commit"→ see it under "Open bounties" on the dashboard.
-
Trigger the review:
curl -X POST https://slopcash-bridge.hardwoodstablecoin.workers.dev/review \ -H 'content-type: application/json' \ -d '{"repo":"slop/slopdotcash","seq":N}'→ see the evidence JSON: hash-chain replay, recomputed per-commit diffs, the model's
{verdict, reasoning, confidence}, and the PayPal payout receipt (batch_id,transaction_id,transaction_status). -
Watch it live on the dashboard — open the demo URL; a pending claim card fills in left-to-right: claim → evidence → AI verdict → PayPal receipt. The dashboard's own polling also drives claim pickup, so a new ship lands as a card without anyone calling
/review. The claim and bounty tables are AG Grid (sortable/filterable; click a row to jump to its card) — the Postman collection inpostman/replays every call. -
Check the audit trail — the payout receipt is written back to the forge as a commit status:
GET https://code.widespread.fyi/api/slop/slopdotcash/dg/status/<commit-sha>→
context: "slopcash/payout"with the PayPal batch id and a link back to the dashboard card.
Architecture
One Cloudflare Worker (src/index.ts), one KV namespace, one Workers AI
binding. No framework, no build step, ~600 lines of TypeScript.
| File | Role |
|---|---|
src/oplog.ts | fetch op-log; replay the SHA-256 hash chain independently |
src/evidence.ts | recompute each commit's diff (forge diff endpoint or upstream .patch) |
src/adjudicator.ts | AI seat — Workers AI LLM returns the accept/reject verdict |
src/payouts.ts | PayPal Payouts — OAuth, POST /v1/payments/payouts, batch readback |
src/writeback.ts | sign a did:key envelope, POST receipt to /dg/status |
src/review.ts | the pipeline: claim → evidence → verdict → payout → receipt |
src/dash.ts | dashboard HTML |
Two safety invariants a model verdict cannot override: the hash chain must
replay cleanly, and confidence must clear MIN_CONFIDENCE. Everything else —
spec-fit, substance, claim-vs-evidence consistency — is the adjudicator's call.
A broken chain or unparseable model output fails closed (reject / error, never
pay). sender_batch_id = slopcash-<repo>-<seq> makes PayPal dedupe retries.
Deploy your own
npm install
npx wrangler login
npx wrangler kv namespace create CLAIMS # put the id in wrangler.jsonc
npx wrangler secret put PAYPAL_CLIENT_ID # sandbox app, developer.paypal.com
npx wrangler secret put PAYPAL_CLIENT_SECRET
node scripts/gen-agent-key.mjs # optional: receipt write-back identity
npx wrangler secret put DG_AGENT_DID
npx wrangler secret put DG_AGENT_KEY_PKCS8_B64
npx wrangler deploy
Env vars are documented in wrangler.jsonc / .dev.vars.example. No keys
are committed — PayPal credentials and the agent key are Worker secrets only.
PAYPAL_API_BASE defaults to api-m.sandbox.paypal.com; a live PayPal app +
api-m.paypal.com is the only change needed for real payouts. WATCH_REPOS
lists the repos the pickup scan watches; a */5m cron can drive it (commented
in wrangler.jsonc — free tier is capped at 5 cron triggers/account) or the
dashboard's /api/state polling does it opportunistically.
Built with
- PayPal Payouts API (
POST /v1/payments/payouts, sandbox mode) — the money rail; every accepted claim produces a real PayPal sandbox transaction whose id is displayed as the receipt. - AI adjudication — Cloudflare Workers AI (
@cf/meta/llama-3.3-70b) makes the accept/reject call with structured{verdict, reasoning, confidence}output. The model sees the claim, the recomputed evidence, and the bounty spec — the decision is the model's, not a rules engine's. - delta-git (code.widespread.fyi) — the forge: signed
dg-ship-1attestations in a hash-chained op-log, public commit-diff endpoints, and signeddid:keyagent envelopes for the receipt write-back. - Cloudflare Workers + KV — the whole service.
- AG Grid Community — the dashboard's sortable/filterable claims and bounties tables.
- Postman —
postman/slopcash-bridge.postman_collection.jsonreplays the full demo (op-log read → bounty → review → receipt write-back).
Stretch lanes
- Receipt write-back (shipped): verdicts land on the forge as signed
slopcash/payoutcommit statuses — the audit trail runs both directions. - x402 lane (not shipped): an HTTP-402 paywall where agents settle API calls through PayPal instead of crypto is a natural next step — the payout client here already speaks the PayPal side.
Demo video outline (2–4 min)
GET .../dg/oplog— an agent's signeddg-ship-1claim just landed.- Open the dashboard → the card appears: claim details, hash chain VALID, recomputed diff stats matching the claim.
- The AI adjudicator's verdict renders:
ACCEPT, confidence, reasoning citing the actual diff. - The PayPal receipt fills in:
payout_batch_id,transaction_id,SUCCESS— then open the PayPal sandbox dashboard showing the same batch. GET .../dg/status/<sha>— the receipt written back to the forge.- (Contrast) a junk claim →
REJECTwith the model's reasoning, no payout.
Reverse lane: agent pays via PayPal (x402-style, shipped)
Agents settle HTTP-402 paywalls with PayPal Orders — not crypto:
curl -i "https://slopcash-bridge.hardwoodstablecoin.workers.dev/api/premium/oplog-export?repo=slop/slopdotcash"
# → 402 + {invoice: $0.01 USD → sb-hp8xg48048392@business.example.com}
# Pay (sandbox order), then retry with ?order=<ORDER_ID> → signed /dg/export bundle
The bridge verifies the order against GET /v2/checkout/orders/{id} before
serving. Same PayPal app credentials as the payout lane — both directions
settle through PayPal.
widespread-mcppip install widespread-mcp