Spaces:
Paused
title: GBridge PhoneGPU
emoji: π±
colorFrom: indigo
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
license: mit
GBridge PhoneGPU
The Hugging Face Space that turns an iPhone into a private ML server and turns Windsurf into the build agent for the bridge itself.
The Space is the public endpoint. The iPhone is the private model worker. Windsurf is the engineering agent. gbridge is the connective tissue. Every job produces a signed receipt.
What this is
GBridge is a capability-to-endpoint connectivity layer.
A live node (iPhone, browser, Windsurf agent) advertises a capability, leases it to the Space, and the Space binds it to an HTTP/WebSocket endpoint. Jobs route to the node. Results return with signed receipts.
Pages
/β Landing / Manifest/phoneβ iPhone compute bridge with QR pairing/gbridgeβ Protocol explorer with capability lease table/windsurfβ Build packet generator and MCP manifest export/receiptsβ Proof console for signed compute receipts/dashboardβ 2050 real-time control plane
Core API
POST /api/gbridge/sessionβ create compute sessionGET /api/gbridge/session/{id}β session statusPOST /cap/{capability_name}β invoke leased capabilityGET /api/windsurf/packetβ Windsurf build packetGET /api/windsurf/mcpβ MCP server manifestPOST /api/windsurf/ingestβ ingest agent build reportGET /api/receiptsβ list receiptsPOST /api/receipts/{id}/verifyβ verify receipt
gbridge primitive
route_capability_call(capability_name, payload)
- Find active lease for capability
- Verify lease is not expired
- Check payload policy
- Create job
- Route to correct node
- Return async job id
- Verify receipt
- Return output + receipt
Architecture
Hugging Face Space
βββ gbridge router
βββ phone relay (WebSocket)
βββ receipt verifier
βββ Windsurf packet generator
βββ MCP manifest exporter
iPhone Worker (PWA)
βββ local runtime detector
βββ local ML / redaction / embeddings
βββ device keypair
βββ signed receipt emitter
Windsurf / Cascade
βββ consumes generated build packet
βββ optionally connects through MCP/gbridge manifest
βββ patches repo
βββ sends build report back as receipt
What this is
PhoneGPU Space creates a new topology:
- Public Space = control plane, API, marketplace, verifier, dashboard
- iPhone = private edge inference node (Neural Engine / GPU / CPU)
- Receipt = proof of local execution
This is not cloud inference from a phone. This is device-leased inference: a public Hugging Face Space temporarily binds a private iPhone as its backend ML worker through a revocable, receipt-producing compute session.
How it works
- Open the Space and create a session
- Scan the QR code with your iPhone
- The iPhone registers as a worker and advertises its capabilities
- Submit an inference job through the Space UI or API
- The iPhone receives the job, runs it locally with Core ML / Web ML
- The iPhone returns the result plus a signed receipt
- The Space verifies and stores the receipt
Environment Variables
| Variable | Description | Default |
|---|---|---|
SPACE_PUBLIC_URL |
Public URL of this Space | Auto-detected |
SESSION_TTL_SECONDS |
Session lifetime | 3600 |
JOB_TTL_SECONDS |
Job timeout | 300 |
MAX_PAYLOAD_BYTES |
Max request payload | 10485760 |
REQUIRE_DEVICE_SIGNATURES |
Require signed receipts | false |
RECEIPT_STORAGE_PATH |
Where to store receipts | ./data/receipts.jsonl |
API Endpoints
POST /api/sessionβ Create a new compute sessionGET /api/session/{id}β Get session statusPOST /api/session/{id}/jobβ Submit inference jobGET /api/job/{id}β Get job resultGET /api/receipt/{id}β Get signed receiptPOST /api/receipt/{id}/verifyβ Verify receiptGET /workerβ iPhone worker page (with QR scan)WS /ws/worker/{session_id}/{worker_id}β Worker WebSocket
Capabilities (v1)
iphone.text.embedding.privateβ Local text embeddingiphone.image.classify.localβ Local image classificationiphone.privacy.redact.localβ Local privacy redaction
Architecture
User β HF Space UI/API β Session β Job Queue β iPhone Worker β Core ML/ONNX/WebML β Signed Result β Receipt
Security
- Outbound-only connections from iPhone (no inbound ports needed)
- Worker join tokens with expiry
- Ed25519 receipt signatures where supported
- Input/output hashing for verification
- Privacy modes: raw, hash-only, local-only
Development
pip install -r requirements.txt
python -m uvicorn app.main:app --host 0.0.0.0 --port 7860
License
Proprietary β Membra Technologies