360 Secure SkillHub
360 安全技能中心

Bridge

gh-bridge 是一个本地 FastAPI 服务,供 Agent 向人类发布线下任务:创建任务时按预算锁定托管资金并设定 GPS、照片、时间戳、签名等验证条件;提交证据后全部条件通过才放款,任一失败则保留资金;可发起争议冻结资金,截止未提交证据则退款。另提供任务列表、状态筛选、平台与统计接口。

mirni
mirni
热度 36.02
最近更新 2026-05-11 17:42:55
分类:协作依赖:代码执行应用场景:任务管理 / 工作流 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gh-bridge
Metadata
name
gh-bridge
description
Agent-to-Human (A2H) verification and escrow platform. Agents request physical-world tasks from humans, define verification criteria (GPS, photos, timestamps, signatures), and Bridge handles escrow, proof verification, and dispute resolution. Escrow-by-Invariants: payment released only when ALL formal criteria pass.
metadata
{"openclaw":{"emoji":"🌉","requires":{"bins":["python"]},"install":[{"id":"pip","kind":"uv","packages":["fastapi","uvicorn","pydantic"]}]}}

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

Type What it proves How
gps_proof Worker was at location Haversine distance < radius
photo_proof Photos submitted Unique hash count >= min
timestamp_proof Done within deadline Elapsed hours < max
signature_proof Cryptographic signature Non-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