← 返回
未分类

Bridge

Agent-to-Human (A2H) verification and escrow platform. Agents request physical-world tasks from humans, define verification criteria (GPS, photos, timestamps...
mirni
未分类 clawhub v1.0.0 100000 Key: 无需
★ 0
Stars
📥 339
下载
💾 0
安装

概述

Bridge

Request human help for physical-world tasks. Bridge verifies the work was done before releasing payment.

Start the server

uvicorn bridge.app:app --port 8015

Create a task with verification criteria

curl -s -X POST http://localhost:8015/v1/tasks \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Pick up package at 123 Main St, photograph it",
    "budget_usdc": "25.00",
    "verification_criteria": [
      {"type": "gps_proof", "description": "At pickup location", "params": {"latitude": 37.7749, "longitude": -122.4194, "radius_m": 100}},
      {"type": "photo_proof", "description": "Photo of package", "params": {"min_photos": 1}}
    ]
  }' | jq

Escrow is locked automatically. Fee is 5% of budget.

Submit proof and verify

curl -s -X POST http://localhost:8015/v1/tasks/TASK_ID/verify \
  -H "Content-Type: application/json" \
  -d '{
    "worker_id": "worker-1",
    "proofs": [
      {"type": "gps_proof", "data": {"latitude": 37.7749, "longitude": -122.4194}},
      {"type": "photo_proof", "data": {"photo_hashes": ["sha256:abc123"]}}
    ]
  }' | jq

If ALL criteria pass → escrow released. If any fail → escrow held.

Dispute a task

curl -s -X POST http://localhost:8015/v1/tasks/TASK_ID/dispute \
  -H "Content-Type: application/json" \
  -d '{"reason": "GPS proof appears faked"}' | jq

Freezes escrow. No verification possible while disputed.

Other endpoints

curl -s http://localhost:8015/v1/tasks | jq                    # List all tasks
curl -s http://localhost:8015/v1/tasks?status=posted | jq      # Filter by status
curl -s http://localhost:8015/v1/platforms | jq                 # Available platforms
curl -s http://localhost:8015/v1/stats | jq                    # Platform statistics

Verification types

TypeWhat it provesHow
--------------------------
gps_proofWorker was at locationHaversine distance < radius
photo_proofPhotos submittedUnique hash count >= min
timestamp_proofDone within deadlineElapsed hours < max
signature_proofCryptographic signatureNon-empty signature present

Escrow model

  • Locked at task creation (budget held)
  • Released only if ALL criteria pass
  • Frozen on dispute
  • Refunded if deadline expires with no proof

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 18:38 安全 安全

安全检测

暂无安全检测报告