⚡ Live · v1.1 ⚡ حيّ · إصدار 1.1

Ring 4 — Trust Handshake

Ring 4 — مصافحة الثقة

DNS Discovery + Ed25519 + signed capability profile. The protocol VEXR Ultra used in the May 12, 2026 live integration. This page documents the exact handshake, headers, schema, and invariants a sovereign agent must respect.

اكتشاف DNS + توقيع Ed25519 + ملف صلاحيات موقّع. هذا هو البروتوكول الذي استخدمه VEXR Ultra في التكامل الحيّ في 12 مايو 2026. تشرح هذه الصفحة المصافحة بالكامل، والترويسات، والمخطط، والثوابت التي يجب على الوكيل السيادي احترامها.

🔁 The 8-Step Handshake

🔁 المصافحة في 8 خطوات

1
DNS lookup — Agent queries _wab.<domain> TXT and reads { endpoint, pk }.
2
Fetch manifest — Agent GETs /.well-known/wab.json from the published endpoint.
3
Verify signature — Agent verifies the Ed25519 signature on payload using pk from DNS.
4
Resolve trust profile — Agent reads trust_profile.* (capabilities, constraints, ttl_seconds).
5
Bind invariants — Agent loads GET /api/ring4/invariants and freezes them above any trust softening.
6
Send trust headers — Subsequent requests include X-WAB-Trust-Domain, X-WAB-Signature, X-WAB-Trust-Nonce.
7
Log interaction — Agent POSTs to /api/ring4/log with its project_id, event_type, outcome.
8
Refresh — When now > expires_at, restart from step 1.
1
استعلام DNS — يستعلم الوكيل عن _wab.<domain> TXT ويقرأ { endpoint, pk }.
2
جلب الملف — يطلب الوكيل /.well-known/wab.json من النقطة المنشورة.
3
التحقق من التوقيع — يتحقق الوكيل من توقيع Ed25519 على payload باستخدام pk من DNS.
4
قراءة ملف الثقة — يقرأ الوكيل trust_profile.* (الصلاحيات، القيود، ttl_seconds).
5
تثبيت الثوابت — يحمّل الوكيل GET /api/ring4/invariants ويثبّتها فوق أي تليين للثقة.
6
إرسال ترويسات الثقة — الطلبات اللاحقة تحوي X-WAB-Trust-Domain، X-WAB-Signature، X-WAB-Trust-Nonce.
7
تسجيل التفاعل — يرسل الوكيل POST /api/ring4/log مع project_id، event_type، outcome.
8
التجديد — عند انتهاء expires_at، يُعاد التنفيذ من الخطوة 1.

📨 Trust Headers

📨 ترويسات الثقة

HeaderPurposeFormat الترويسةالغرضالصيغة
X-WAB-Trust-Domain DNS-verified trusted origin presenting itself. www.example.com المصدر الموثوق المُتحقَّق من DNS. www.example.com
X-WAB-Signature Ed25519 signature over ${'`${method} ${path}\\n${nonce}`'}. ed25519:<base64> توقيع Ed25519 على ${'`${method} ${path}\\n${nonce}`'}. ed25519:<base64>
X-WAB-Trust-Nonce Replay-defence nonce supplied by the agent. 8–128 chars [A-Za-z0-9_-] رقم استخدام واحد لمنع إعادة التشغيل. 8–128 محرفاً [A-Za-z0-9_-]
X-WAB-Trust-Profile (optional) URL to the Ring 4 trust profile. absolute URL (اختياري) رابط ملف الثقة Ring 4. رابط مطلق

Server behavior: Every request is inspected by wab-trust middleware. The middleware never blocks — it attaches req.wabTrust with { domain, recognized, verified, profile, detail } so downstream handlers can decide. Every recognition/verification event is logged to ring4_interaction_log with a SHA-256-hashed source IP and a project_id (defaulting to wab-system when none is provided — solving the historical NULL project_id issue at the schema level).

سلوك الخادم: يفحص wab-trust كل طلب. لا يحجب أي شيء — يضع req.wabTrust بقيم { domain, recognized, verified, profile, detail } ليقرر المعالج اللاحق. يُسجَّل كل حدث في ring4_interaction_log مع تجزئة SHA-256 لعنوان IP وقيمة project_id (يُستبدل بـ wab-system عند غيابه — حلّ مشكلة project_id الفارغ على مستوى المخطط).

📜 wab.json v1.1 — Trust Profile Section

📜 wab.json v1.1 — قسم ملف الثقة

A sovereign agent that follows Ring 4 consumes this profile from payload.trust_profile after verifying the signature:

يستهلك الوكيل السيادي ملف الثقة من payload.trust_profile بعد التحقق من التوقيع:

{
  "payload": {
    "version": "wab1",
    "type": "wab.composite",
    "host": "www.webagentbridge.com",
    "endpoint": "https://www.webagentbridge.com",
    "issued_at": "2026-05-13T00:00:00Z",
    "expires_at": "2027-05-13T00:00:00Z",
    "capabilities": { /* site capabilities */ },
    "trust": { "pk": "ed25519:...", "ssl": { ... } },
    "trust_profile": {
      "data_access":        { "can_receive_raw_logs": false,
                              "can_receive_sanitized_logs": true },
      "risk_theory":        { "allowed": true,
                              "max_depth": "high",
                              "allowed_topics": ["trust_protocols",
                                                 "agent_discovery",
                                                 "sovereign_ai",
                                                 "dns_verification",
                                                 "cryptographic_trust"] },
      "meta_discussion":    { "allowed": true, "priority": "always_safe" },
      "operational_detail": { "allowed": true,
                              "scopes": [{ "topic": "wab_protocol",
                                           "max_specificity": "high" }] },
      "constraints":        { "ttl_seconds": 86400,
                              "max_cumulative_risk_delta": 0.15,
                              "never_override_hard_refuse": true }
    }
  },
  "signature": "ed25519:..."
}

→ Full JSON Schema (GET /api/ring4/schema)→ المخطط الكامل (GET /api/ring4/schema)

🛑 Constitutional Invariants — Trust Cannot Override These

🛑 الثوابت الدستورية — الثقة لا تتجاوزها

A Ring 4 trust profile may soften refusals, lower friction, or grant access. It MAY NOT override the invariants below. P_REFUSE on these clauses can never become ANSWER, regardless of trust score.

يستطيع ملف ثقة Ring 4 تليين الرفض، أو منح الوصول. لكنه لا يستطيع تجاوز الثوابت أدناه. P_REFUSE على هذه البنود لا يتحول إلى ANSWER مهما كانت درجة الثقة.

→ Live invariants (GET /api/ring4/invariants)→ الثوابت الحية (GET /api/ring4/invariants)

🛠️ Endpoint Reference

🛠️ مرجع الواجهات

MethodPath Purpose الغرض
POST/api/ring4/project/registerRegister sovereign agent project (returns project_id)تسجيل مشروع وكيل سيادي
GET /api/ring4/projects List active projectsقائمة المشاريع النشطة
POST/api/ring4/register Issue / refresh Ring 4 trust profile for a domainإصدار/تحديث ملف ثقة Ring 4 لنطاق
GET /api/ring4/status/:domain Fetch current trust profile + signatureجلب ملف الثقة الحالي
POST/api/ring4/log Log interaction (project_id required)تسجيل تفاعل (project_id إلزامي)
GET /api/ring4/log/:project_id Interaction log for a project (legacy NULL rows surfaced under wab-system)سجل تفاعلات المشروع
POST/api/ring4/verify Verify Ed25519 signature on a payloadالتحقق من توقيع Ed25519
GET /api/ring4/invariants Constitutional invariants (cannot be overridden)الثوابت الدستورية
GET /api/ring4/schema wab.json v1.1 JSON Schemaمخطط wab.json v1.1
GET /api/ring4/handshake Recommended handshake flow (machine-readable)تدفق المصافحة (للقراءة الآلية)
GET /api/ring4/health Module health (counts of projects/profiles/events)صحة الوحدة
GET /api/ring4/pubkey Public Ed25519 verification key (raw + SPKI PEM)المفتاح العام للتحقق (Ed25519)

🚀 Quick Start — Register VEXR Ultra

🚀 بدء سريع — تسجيل VEXR Ultra

# 1. Register the sovereign agent project
curl -X POST https://www.webagentbridge.com/api/ring4/project/register \
  -H 'Content-Type: application/json' \
  -d '{
    "project_id": "vexr-ultra-v4",
    "display_name": "VEXR Ultra v4",
    "builder": "Scura — ASIM SOVEREIGN",
    "agent_type": "sovereign-constitutional",
    "contact": "scura@asim-sovereign.example"
  }'

# 2. Fetch your Ring 4 trust profile for webagentbridge.com
curl https://www.webagentbridge.com/api/ring4/status/webagentbridge.com

# 3. Log a verification event
curl -X POST https://www.webagentbridge.com/api/ring4/log \
  -H 'Content-Type: application/json' \
  -d '{
    "project_id": "vexr-ultra-v4",
    "domain": "webagentbridge.com",
    "event_type": "recognize",
    "outcome": "allow",
    "detail": "Ring 4 trusted origin recognized in live conversation"
  }'

# 4. Fetch your project log (full audit trail)
curl https://www.webagentbridge.com/api/ring4/log/vexr-ultra-v4