web-agent-bridge 3.4.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +84 -84
- package/README.ar.md +1565 -1304
- package/README.md +171 -298
- package/bin/agent-runner.js +474 -474
- package/bin/cli.js +237 -237
- package/bin/wab-init.js +244 -223
- package/bin/wab.js +80 -80
- package/examples/azure-dns-wab.js +83 -83
- package/examples/bidi-agent.js +119 -119
- package/examples/cloudflare-wab-dns.js +121 -121
- package/examples/cpanel-wab-dns.js +114 -114
- package/examples/cross-site-agent.js +91 -91
- package/examples/dns-discovery-agent.js +166 -166
- package/examples/gcp-dns-wab.js +76 -76
- package/examples/governance-agent.js +169 -169
- package/examples/mcp-agent.js +94 -94
- package/examples/next-app-router/README.md +44 -44
- package/examples/plesk-wab-dns.js +103 -103
- package/examples/puppeteer-agent.js +108 -108
- package/examples/route53-wab-dns.js +144 -144
- package/examples/saas-dashboard/README.md +55 -55
- package/examples/safe-mode-agent.js +96 -96
- package/examples/self-discovery.js +106 -0
- package/examples/shopify-hydrogen/README.md +74 -74
- package/examples/vision-agent.js +171 -171
- package/examples/wab-sign.js +74 -74
- package/examples/wab-verify.js +60 -60
- package/examples/wordpress-elementor/README.md +77 -77
- package/package.json +93 -93
- package/public/.well-known/agent-tools.json +180 -180
- package/public/.well-known/ai-assets.json +59 -59
- package/public/.well-known/security.txt +8 -8
- package/public/.well-known/wab.json +28 -28
- package/public/activate.html +448 -368
- package/public/adopt.html +236 -0
- package/public/adoption-metrics.html +188 -188
- package/public/agent-workspace.html +359 -349
- package/public/ai.html +198 -198
- package/public/api.html +397 -413
- package/public/atp.html +171 -0
- package/public/azure-dns-integration.html +289 -289
- package/public/browser.html +486 -486
- package/public/cloudflare-integration.html +380 -380
- package/public/commander-dashboard.html +243 -243
- package/public/cookies.html +210 -210
- package/public/cpanel-integration.html +398 -398
- package/public/css/agent-workspace.css +1713 -1713
- package/public/css/premium.css +317 -317
- package/public/css/styles.css +1401 -1263
- package/public/dashboard-shieldlink.html +295 -0
- package/public/dashboard.html +711 -707
- package/public/dns.html +436 -436
- package/public/docs.html +588 -588
- package/public/enterprise-mesh.ar.html +80 -0
- package/public/enterprise-mesh.html +81 -0
- package/public/feed.xml +89 -89
- package/public/gcp-dns-integration.html +318 -318
- package/public/governance.ar.html +70 -0
- package/public/governance.html +69 -0
- package/public/growth.html +465 -465
- package/public/index.html +1372 -1266
- package/public/integrations.html +556 -556
- package/public/js/activate.js +449 -145
- package/public/js/agent-workspace.js +1740 -1740
- package/public/js/auth-nav.js +117 -65
- package/public/js/auth-redirect.js +12 -12
- package/public/js/cookie-consent.js +56 -56
- package/public/js/dns.js +438 -438
- package/public/js/wab-demo-page.js +721 -721
- package/public/js/ws-client.js +74 -74
- package/public/l-preview.html +242 -0
- package/public/llms-full.txt +360 -360
- package/public/llms.txt +125 -125
- package/public/login.html +85 -85
- package/public/mesh-dashboard.html +328 -328
- package/public/milestones.html +346 -0
- package/public/one-click.html +779 -0
- package/public/openapi.json +669 -669
- package/public/partners.ar.html +145 -0
- package/public/partners.html +143 -0
- package/public/phone-shield.html +281 -281
- package/public/plesk-integration.html +375 -375
- package/public/premium-dashboard.html +2489 -2489
- package/public/premium.html +793 -793
- package/public/privacy.html +297 -297
- package/public/provider-onboarding.html +172 -172
- package/public/provider-sandbox.html +134 -134
- package/public/providers.html +359 -359
- package/public/refusals.html +172 -0
- package/public/register.html +105 -105
- package/public/registrar-integrations.html +141 -141
- package/public/ring4.html +292 -0
- package/public/robots.txt +99 -99
- package/public/route53-integration.html +531 -531
- package/public/score.html +263 -0
- package/public/script/wab-consent.d.ts +36 -36
- package/public/script/wab-consent.js +104 -104
- package/public/script/wab-schema.js +131 -131
- package/public/script/wab.d.ts +108 -108
- package/public/script/wab.min.js +580 -580
- package/public/security.txt +8 -8
- package/public/shieldlink.html +244 -0
- package/public/shieldqr.html +231 -231
- package/public/sitemap.xml +13 -1
- package/public/terms.html +256 -256
- package/public/trust-graph-api.ar.html +92 -0
- package/public/trust-graph-api.html +91 -0
- package/public/wab-features.html +560 -0
- package/public/wab-trust.html +200 -200
- package/public/wab-truth.html +375 -0
- package/public/wab-vs-protocols.html +210 -210
- package/public/whitepaper.html +449 -449
- package/script/ai-agent-bridge.js +1754 -1754
- package/sdk/README.md +99 -99
- package/sdk/agent-mesh.js +449 -449
- package/sdk/atp.js +103 -0
- package/sdk/auto-discovery.js +301 -288
- package/sdk/commander.js +262 -262
- package/sdk/governance.js +262 -262
- package/sdk/index.d.ts +464 -464
- package/sdk/index.js +653 -649
- package/sdk/multi-agent.js +318 -318
- package/sdk/safe-mode.js +221 -221
- package/sdk/safety-shield.js +219 -219
- package/sdk/schema-discovery.js +83 -83
- package/server/adapters/index.js +520 -520
- package/server/config/plans.js +412 -367
- package/server/config/secrets.js +102 -102
- package/server/control-plane/index.js +301 -301
- package/server/data-plane/index.js +354 -354
- package/server/index.js +793 -670
- package/server/llm/index.js +404 -404
- package/server/middleware/adminAuth.js +35 -35
- package/server/middleware/api-tier.js +170 -0
- package/server/middleware/auth.js +50 -50
- package/server/middleware/featureGate.js +88 -88
- package/server/middleware/rateLimits.js +100 -100
- package/server/middleware/sensitiveAction.js +157 -157
- package/server/middleware/wab-trust.js +141 -0
- package/server/migrations/001_add_analytics_indexes.sql +7 -7
- package/server/migrations/002_premium_features.sql +418 -418
- package/server/migrations/003_ads_integer_cents.sql +33 -33
- package/server/migrations/004_agent_os.sql +158 -158
- package/server/migrations/005_marketplace_metering.sql +126 -126
- package/server/migrations/006_growth_suite.sql +138 -0
- package/server/migrations/007_governance.sql +106 -106
- package/server/migrations/008_plans.sql +144 -144
- package/server/migrations/009_shieldqr.sql +30 -30
- package/server/migrations/010_extended_trust.sql +33 -33
- package/server/migrations/011_outreach.sql +47 -0
- package/server/migrations/012_shieldlink.sql +116 -0
- package/server/migrations/013_ct_monitor.sql +13 -0
- package/server/migrations/014_wab_advanced_features.sql +128 -0
- package/server/migrations/015_wab_truth_layer.sql +101 -0
- package/server/migrations/016_ring4_external_trust.sql +84 -0
- package/server/migrations/017_ring4_extensions.sql +69 -0
- package/server/migrations/018_commercial_foundations.sql +167 -0
- package/server/migrations/019_unify_tier_constraints.sql +133 -0
- package/server/migrations/020_agent_transaction_primitive.sql +119 -0
- package/server/models/adapters/index.js +33 -33
- package/server/models/adapters/mysql.js +183 -183
- package/server/models/adapters/postgresql.js +172 -172
- package/server/models/adapters/sqlite.js +7 -7
- package/server/models/db.js +740 -740
- package/server/observability/failure-analysis.js +337 -337
- package/server/observability/index.js +394 -394
- package/server/protocol/capabilities.js +223 -223
- package/server/protocol/index.js +243 -243
- package/server/protocol/schema.js +584 -584
- package/server/registry/certification.js +271 -271
- package/server/registry/index.js +326 -326
- package/server/routes/activate.js +478 -0
- package/server/routes/admin-outreach.js +239 -0
- package/server/routes/admin-plans.js +76 -76
- package/server/routes/admin-premium.js +674 -673
- package/server/routes/admin-shieldlink.js +137 -0
- package/server/routes/admin-shieldqr.js +90 -90
- package/server/routes/admin-trust-monitor.js +139 -83
- package/server/routes/admin.js +550 -549
- package/server/routes/adopt.js +61 -0
- package/server/routes/ads.js +130 -130
- package/server/routes/agent-workspace.js +540 -540
- package/server/routes/api-keys.js +127 -0
- package/server/routes/api.js +150 -150
- package/server/routes/auth.js +71 -71
- package/server/routes/billing.js +57 -57
- package/server/routes/commander.js +316 -316
- package/server/routes/customer-shieldlink.js +133 -0
- package/server/routes/demo-showcase.js +332 -332
- package/server/routes/demo-store.js +154 -154
- package/server/routes/diagnose.js +373 -0
- package/server/routes/discovery.js +2348 -2348
- package/server/routes/enterprise-mesh.js +170 -0
- package/server/routes/gateway.js +173 -173
- package/server/routes/governance-saas.js +203 -0
- package/server/routes/governance.js +208 -208
- package/server/routes/growth.js +1048 -0
- package/server/routes/intent.js +328 -0
- package/server/routes/license.js +251 -251
- package/server/routes/mesh.js +469 -469
- package/server/routes/noscript.js +543 -543
- package/server/routes/partners.js +201 -0
- package/server/routes/plans.js +33 -33
- package/server/routes/premium-v2.js +686 -686
- package/server/routes/premium.js +724 -724
- package/server/routes/providers.js +650 -650
- package/server/routes/reputation.js +411 -0
- package/server/routes/ring4.js +885 -0
- package/server/routes/runtime.js +2148 -2148
- package/server/routes/shieldlink.js +70 -0
- package/server/routes/shieldqr.js +88 -88
- package/server/routes/sovereign.js +465 -465
- package/server/routes/transactions.js +233 -0
- package/server/routes/truth-layer.js +670 -0
- package/server/routes/universal.js +200 -200
- package/server/routes/unsubscribe.js +51 -0
- package/server/routes/wab-api.js +850 -850
- package/server/routes/wab-cache.js +282 -0
- package/server/runtime/container-worker.js +111 -111
- package/server/runtime/container.js +448 -448
- package/server/runtime/distributed-worker.js +362 -362
- package/server/runtime/event-bus.js +210 -210
- package/server/runtime/index.js +253 -253
- package/server/runtime/queue.js +599 -599
- package/server/runtime/replay.js +666 -666
- package/server/runtime/sandbox.js +266 -266
- package/server/runtime/scheduler.js +534 -534
- package/server/runtime/session-engine.js +293 -293
- package/server/runtime/state-manager.js +188 -188
- package/server/secrets/wab-signing-key.pem +3 -0
- package/server/secrets/wab-signing-pub.pem +3 -0
- package/server/security/cross-site-redactor.js +196 -196
- package/server/security/dry-run.js +180 -180
- package/server/security/human-gate-rate-limit.js +147 -147
- package/server/security/human-gate-transports.js +178 -178
- package/server/security/human-gate.js +281 -281
- package/server/security/index.js +368 -368
- package/server/security/intent-engine.js +245 -245
- package/server/security/reward-guard.js +171 -171
- package/server/security/rollback-store.js +239 -239
- package/server/security/token-scope.js +404 -404
- package/server/security/url-policy.js +139 -139
- package/server/services/adoption-agent.js +182 -0
- package/server/services/agent-chat.js +506 -506
- package/server/services/agent-learning.js +601 -601
- package/server/services/agent-memory.js +625 -625
- package/server/services/agent-mesh.js +555 -555
- package/server/services/agent-symphony.js +717 -717
- package/server/services/agent-tasks.js +1807 -1807
- package/server/services/api-key-engine.js +292 -292
- package/server/services/cluster.js +894 -894
- package/server/services/commander.js +738 -738
- package/server/services/edge-compute.js +440 -440
- package/server/services/email.js +233 -233
- package/server/services/fairness-engine.js +409 -0
- package/server/services/fairness.js +420 -0
- package/server/services/governance.js +466 -466
- package/server/services/hosted-runtime.js +205 -205
- package/server/services/lfd.js +635 -635
- package/server/services/local-ai.js +389 -389
- package/server/services/marketplace.js +270 -270
- package/server/services/metering.js +182 -182
- package/server/services/modules/affiliate-intelligence.js +93 -93
- package/server/services/modules/agent-firewall.js +90 -90
- package/server/services/modules/bounty.js +89 -89
- package/server/services/modules/collective-bargaining.js +92 -92
- package/server/services/modules/dark-pattern.js +66 -66
- package/server/services/modules/gov-intelligence.js +45 -45
- package/server/services/modules/neural.js +55 -55
- package/server/services/modules/notary.js +49 -49
- package/server/services/modules/price-time-machine.js +86 -86
- package/server/services/modules/protocol.js +104 -104
- package/server/services/negotiation.js +439 -439
- package/server/services/outreach-agent.js +312 -0
- package/server/services/plans.js +214 -214
- package/server/services/plugins.js +771 -771
- package/server/services/price-intelligence.js +566 -566
- package/server/services/price-shield.js +1137 -1137
- package/server/services/provider-clients.js +740 -740
- package/server/services/reputation.js +465 -465
- package/server/services/search-engine.js +357 -357
- package/server/services/security.js +513 -513
- package/server/services/self-healing.js +843 -843
- package/server/services/shieldlink.js +492 -0
- package/server/services/shieldqr.js +322 -322
- package/server/services/sovereign-shield.js +542 -542
- package/server/services/ssl-ct-monitor.js +224 -0
- package/server/services/ssl-inspector.js +42 -42
- package/server/services/ssl-monitor.js +167 -167
- package/server/services/stripe.js +206 -205
- package/server/services/swarm.js +788 -788
- package/server/services/transactions.js +525 -0
- package/server/services/universal-scraper.js +662 -662
- package/server/services/verification.js +481 -481
- package/server/services/vision.js +1163 -1163
- package/server/services/wab-crypto.js +178 -178
- package/server/utils/cache.js +125 -125
- package/server/utils/migrate.js +81 -81
- package/server/utils/safe-fetch.js +228 -228
- package/server/utils/secureFields.js +50 -50
- package/server/ws.js +161 -161
- package/templates/artisan-marketplace.yaml +104 -104
- package/templates/book-price-scout.yaml +98 -98
- package/templates/electronics-price-tracker.yaml +108 -108
- package/templates/flight-deal-hunter.yaml +113 -113
- package/templates/freelancer-direct.yaml +116 -116
- package/templates/grocery-price-compare.yaml +93 -93
- package/templates/hotel-direct-booking.yaml +113 -113
- package/templates/local-services.yaml +98 -98
- package/templates/olive-oil-tunisia.yaml +88 -88
- package/templates/organic-farm-fresh.yaml +101 -101
- package/templates/restaurant-direct.yaml +97 -97
- package/templates/ring4/banking-sovereign.yaml +55 -0
- package/templates/ring4/ecommerce-sovereign.yaml +58 -0
- package/templates/ring4/healthcare-sovereign.yaml +60 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>WAB Truth Layer — The Network's Shared Reality</title>
|
|
7
|
+
<meta name="description" content="WAB Truth Layer: Semantic Memory Network + Temporal Trust + Intent-to-Action Bridge + Reality Anchor. The collective intelligence layer for AI agents.">
|
|
8
|
+
<link rel="icon" href="/favicon.ico">
|
|
9
|
+
<style>
|
|
10
|
+
:root {
|
|
11
|
+
--bg:#0a0e1a; --card:#111827; --line:#1f2937; --text:#e5e7eb; --muted:#94a3b8;
|
|
12
|
+
--accent:#8b5cf6; --accent2:#6366f1; --ok:#10b981; --warn:#f59e0b; --err:#ef4444;
|
|
13
|
+
}
|
|
14
|
+
* { box-sizing: border-box; }
|
|
15
|
+
html, body { margin:0; padding:0; background:var(--bg); color:var(--text); font:15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
|
|
16
|
+
[dir="rtl"] body { font-family: "Segoe UI", "Tahoma", "Cairo", system-ui, sans-serif; }
|
|
17
|
+
a { color:var(--accent); text-decoration: none; }
|
|
18
|
+
a:hover { text-decoration: underline; }
|
|
19
|
+
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 22px 80px; }
|
|
20
|
+
header.hero { text-align:center; padding: 40px 0 30px; border-bottom:1px solid var(--line); margin-bottom: 36px; }
|
|
21
|
+
header.hero h1 { margin:0 0 12px; font-size: clamp(28px, 4.4vw, 46px); letter-spacing:-.02em;
|
|
22
|
+
background: linear-gradient(135deg, #a78bfa 0%, #6366f1 60%, #06b6d4 100%);
|
|
23
|
+
-webkit-background-clip:text; background-clip:text; -webkit-text-fill-color: transparent;
|
|
24
|
+
}
|
|
25
|
+
header.hero p { color: var(--muted); margin: 0 auto; max-width: 760px; font-size: 17px; }
|
|
26
|
+
.lang-toggle { position: absolute; top: 18px; right: 18px; display:flex; gap:6px; }
|
|
27
|
+
[dir="rtl"] .lang-toggle { right: auto; left: 18px; }
|
|
28
|
+
.lang-toggle button { background:var(--card); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:6px 12px; cursor:pointer; }
|
|
29
|
+
.lang-toggle button.active { background:var(--accent); border-color:var(--accent); }
|
|
30
|
+
.back-link { display:inline-block; margin-top: 14px; color: var(--muted); font-size: 14px; }
|
|
31
|
+
|
|
32
|
+
.feature-grid { display:grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
|
|
33
|
+
.feature-card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding: 22px; }
|
|
34
|
+
.feature-card h2 { margin: 0 0 8px; font-size: 20px; display:flex; align-items:center; gap:10px; }
|
|
35
|
+
.feature-card .lead { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
|
|
36
|
+
.feature-card .demo { background: #0b1220; border:1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; }
|
|
37
|
+
.feature-card label { display:block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
|
|
38
|
+
.feature-card input, .feature-card select, .feature-card textarea {
|
|
39
|
+
width:100%; background:#0a0e1a; border:1px solid var(--line); color:var(--text);
|
|
40
|
+
border-radius:8px; padding:8px 10px; font-size: 14px; font-family: inherit;
|
|
41
|
+
}
|
|
42
|
+
.feature-card textarea { font-family: ui-monospace, Menlo, monospace; font-size:12px; min-height: 84px; }
|
|
43
|
+
.feature-card button.run {
|
|
44
|
+
margin-top: 10px; background:var(--accent); color:#fff; border:0; padding: 9px 16px; border-radius:8px; cursor:pointer; font-weight:600;
|
|
45
|
+
}
|
|
46
|
+
.feature-card button.run:hover { background:var(--accent2); }
|
|
47
|
+
.feature-card pre.result {
|
|
48
|
+
background:#020617; border:1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12px;
|
|
49
|
+
overflow:auto; max-height: 280px; margin-top: 10px; color:#e5e7eb;
|
|
50
|
+
}
|
|
51
|
+
.badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600;
|
|
52
|
+
background:rgba(139,92,246,.15); color:#a78bfa; border:1px solid rgba(139,92,246,.3); }
|
|
53
|
+
.badge.ok { background:rgba(16,185,129,.15); color:#34d399; border-color:rgba(16,185,129,.3); }
|
|
54
|
+
.badge.warn { background:rgba(245,158,11,.15); color:#fbbf24; border-color:rgba(245,158,11,.3); }
|
|
55
|
+
|
|
56
|
+
section.api-ref { margin-top: 50px; }
|
|
57
|
+
section.api-ref h2 { font-size: 22px; margin-bottom: 16px; }
|
|
58
|
+
table.api { width:100%; border-collapse: collapse; background:var(--card); border:1px solid var(--line); border-radius: 10px; overflow:hidden; }
|
|
59
|
+
table.api th, table.api td { padding: 10px 14px; text-align:left; border-bottom:1px solid var(--line); font-size: 13px; }
|
|
60
|
+
[dir="rtl"] table.api th, [dir="rtl"] table.api td { text-align:right; }
|
|
61
|
+
table.api th { background:#0b1220; color:var(--muted); font-weight:600; }
|
|
62
|
+
table.api code { font-size: 12px; color:#a78bfa; }
|
|
63
|
+
.method-GET { color:#10b981; font-weight:600; }
|
|
64
|
+
.method-POST { color:#f59e0b; font-weight:600; }
|
|
65
|
+
|
|
66
|
+
.hero-cta { display:flex; gap:10px; justify-content:center; margin-top: 18px; flex-wrap:wrap; }
|
|
67
|
+
.hero-cta a { padding: 10px 18px; border-radius:10px; background:var(--accent); color:#fff; font-weight:600; }
|
|
68
|
+
.hero-cta a.secondary { background:var(--card); border:1px solid var(--line); color: var(--text); }
|
|
69
|
+
</style>
|
|
70
|
+
</head>
|
|
71
|
+
<body>
|
|
72
|
+
<div class="lang-toggle">
|
|
73
|
+
<button id="btn-en" class="active" onclick="setLang('en')">EN</button>
|
|
74
|
+
<button id="btn-ar" onclick="setLang('ar')">ع</button>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div class="wrap">
|
|
78
|
+
<header class="hero">
|
|
79
|
+
<h1 data-i18n="title">WAB Truth Layer</h1>
|
|
80
|
+
<p data-i18n="subtitle">The collective intelligence layer for AI agents. Semantic Memory · Temporal Trust · Action Graphs · Reality Anchor.</p>
|
|
81
|
+
<div class="hero-cta">
|
|
82
|
+
<a href="/wab-features" data-i18n="cta_features">← WAB Advanced Features</a>
|
|
83
|
+
<a href="/" class="secondary" data-i18n="cta_home">Home</a>
|
|
84
|
+
</div>
|
|
85
|
+
<a class="back-link" href="/" data-i18n="back">← Back to home</a>
|
|
86
|
+
</header>
|
|
87
|
+
|
|
88
|
+
<div class="feature-grid">
|
|
89
|
+
|
|
90
|
+
<!-- 1. Semantic Memory -->
|
|
91
|
+
<div class="feature-card">
|
|
92
|
+
<h2>🧬 <span data-i18n="f1_title">Semantic Memory Network</span></h2>
|
|
93
|
+
<p class="lead" data-i18n="f1_lead">Anonymized observations agents share about how sites behave for each intent. New agents inherit collective knowledge — no PII.</p>
|
|
94
|
+
<div class="demo">
|
|
95
|
+
<label data-i18n="domain">Domain</label>
|
|
96
|
+
<input id="sm-domain" value="webagentbridge.com">
|
|
97
|
+
<label data-i18n="intent_category">Intent category</label>
|
|
98
|
+
<select id="sm-intent">
|
|
99
|
+
<option>booking</option><option>payment</option><option>search</option>
|
|
100
|
+
<option>auth</option><option selected>checkout</option><option>support</option>
|
|
101
|
+
<option>navigation</option><option>content</option><option>other</option>
|
|
102
|
+
</select>
|
|
103
|
+
<label data-i18n="observation">Observation</label>
|
|
104
|
+
<select id="sm-obs">
|
|
105
|
+
<option>fast</option><option>slow</option><option>reliable</option><option>flaky</option>
|
|
106
|
+
<option selected>success</option><option>failure</option><option>blocked</option><option>rate_limited</option>
|
|
107
|
+
</select>
|
|
108
|
+
<button class="run" onclick="smObserve()" data-i18n="btn_observe">Submit observation</button>
|
|
109
|
+
<button class="run" style="background:#0b1220;border:1px solid var(--line)" onclick="smRead()" data-i18n="btn_read">Read summary</button>
|
|
110
|
+
<pre class="result" id="sm-result">—</pre>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<!-- 2. Temporal Trust -->
|
|
115
|
+
<div class="feature-card">
|
|
116
|
+
<h2>⏳ <span data-i18n="f2_title">Temporal Trust</span></h2>
|
|
117
|
+
<p class="lead" data-i18n="f2_lead">Time-stability score. Detects fly-by-night domains, ranks established sites as <em>flagship</em>, flags volatility as <em>suspect</em>.</p>
|
|
118
|
+
<div class="demo">
|
|
119
|
+
<label data-i18n="domain">Domain</label>
|
|
120
|
+
<input id="tt-domain" value="webagentbridge.com">
|
|
121
|
+
<button class="run" onclick="ttRead()" data-i18n="btn_temporal">Get temporal trust</button>
|
|
122
|
+
<button class="run" style="background:#0b1220;border:1px solid var(--line)" onclick="ttSnapshot()" data-i18n="btn_snapshot">Record snapshot (demo)</button>
|
|
123
|
+
<pre class="result" id="tt-result">—</pre>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<!-- 3. Action Graphs -->
|
|
128
|
+
<div class="feature-card">
|
|
129
|
+
<h2>🗺️ <span data-i18n="f3_title">Intent → Action Graph</span></h2>
|
|
130
|
+
<p class="lead" data-i18n="f3_lead">Sites publish ActionGraphs per intent. Agents send a natural-language intent and receive a structured graph of nodes/edges to follow.</p>
|
|
131
|
+
<div class="demo">
|
|
132
|
+
<label data-i18n="domain">Domain</label>
|
|
133
|
+
<input id="ag-domain" value="webagentbridge.com">
|
|
134
|
+
<label data-i18n="intent_text">Intent text</label>
|
|
135
|
+
<input id="ag-intent" placeholder="e.g. activate WAB for my site" value="activate WAB on my site">
|
|
136
|
+
<button class="run" onclick="agResolve()" data-i18n="btn_resolve">Resolve intent</button>
|
|
137
|
+
<button class="run" style="background:#0b1220;border:1px solid var(--line)" onclick="agRegisterDemo()" data-i18n="btn_register_demo">Register demo graph</button>
|
|
138
|
+
<pre class="result" id="ag-result">—</pre>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<!-- 4. Reality Anchor -->
|
|
143
|
+
<div class="feature-card">
|
|
144
|
+
<h2>⚓ <span data-i18n="f4_title">Reality Anchor</span></h2>
|
|
145
|
+
<p class="lead" data-i18n="f4_lead">Agents cross-check facts (prices, availability, ratings) across the WAB network. Defeats LLM hallucination with multi-source consensus.</p>
|
|
146
|
+
<div class="demo">
|
|
147
|
+
<label data-i18n="fact_key">Fact key</label>
|
|
148
|
+
<input id="ra-key" value="demo:wab-price:annual-plan">
|
|
149
|
+
<label data-i18n="fact_type">Fact type</label>
|
|
150
|
+
<select id="ra-type">
|
|
151
|
+
<option selected>price</option><option>availability</option><option>rating</option>
|
|
152
|
+
<option>event</option><option>count</option><option>status</option>
|
|
153
|
+
</select>
|
|
154
|
+
<label data-i18n="value">Value (JSON)</label>
|
|
155
|
+
<textarea id="ra-value">{"amount":299,"currency":"USD"}</textarea>
|
|
156
|
+
<label data-i18n="domain">Source domain</label>
|
|
157
|
+
<input id="ra-domain" value="webagentbridge.com">
|
|
158
|
+
<button class="run" onclick="raSubmit()" data-i18n="btn_submit">Submit fact</button>
|
|
159
|
+
<button class="run" style="background:#0b1220;border:1px solid var(--line)" onclick="raVerify()" data-i18n="btn_verify">Verify consensus</button>
|
|
160
|
+
<pre class="result" id="ra-result">—</pre>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<!-- Unified profile -->
|
|
165
|
+
<div class="feature-card" style="grid-column: 1 / -1;">
|
|
166
|
+
<h2>🌐 <span data-i18n="f5_title">Unified Truth Profile</span></h2>
|
|
167
|
+
<p class="lead" data-i18n="f5_lead">Full Truth Layer view for a domain: reputation, semantic, temporal, action graphs, and reality contributions — in one call.</p>
|
|
168
|
+
<div class="demo">
|
|
169
|
+
<label data-i18n="domain">Domain</label>
|
|
170
|
+
<input id="pr-domain" value="webagentbridge.com">
|
|
171
|
+
<button class="run" onclick="prRead()" data-i18n="btn_profile">Get Truth Profile</button>
|
|
172
|
+
<pre class="result" id="pr-result">—</pre>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<section class="api-ref">
|
|
179
|
+
<h2 data-i18n="api_title">📘 API Reference</h2>
|
|
180
|
+
<table class="api">
|
|
181
|
+
<thead><tr><th>Method</th><th data-i18n="endpoint">Endpoint</th><th data-i18n="description">Description</th></tr></thead>
|
|
182
|
+
<tbody>
|
|
183
|
+
<tr><td><span class="method-POST">POST</span></td><td><code>/api/truth/memory/observe</code></td><td data-i18n="ep1">Submit anonymized observation</td></tr>
|
|
184
|
+
<tr><td><span class="method-GET">GET</span></td><td><code>/api/truth/memory/:domain</code></td><td data-i18n="ep2">Semantic summary for domain</td></tr>
|
|
185
|
+
<tr><td><span class="method-GET">GET</span></td><td><code>/api/truth/memory/:domain/:intent</code></td><td data-i18n="ep3">Per-intent semantic summary</td></tr>
|
|
186
|
+
<tr><td><span class="method-GET">GET</span></td><td><code>/api/truth/temporal/:domain</code></td><td data-i18n="ep4">Temporal trust profile</td></tr>
|
|
187
|
+
<tr><td><span class="method-POST">POST</span></td><td><code>/api/truth/temporal/snapshot</code></td><td data-i18n="ep5">Record trust snapshot</td></tr>
|
|
188
|
+
<tr><td><span class="method-POST">POST</span></td><td><code>/api/truth/action/register</code></td><td data-i18n="ep6">Register an ActionGraph</td></tr>
|
|
189
|
+
<tr><td><span class="method-GET">GET</span></td><td><code>/api/truth/action/:domain/:intent</code></td><td data-i18n="ep7">Fetch an ActionGraph</td></tr>
|
|
190
|
+
<tr><td><span class="method-POST">POST</span></td><td><code>/api/truth/action/resolve</code></td><td data-i18n="ep8">Resolve intent text → graph</td></tr>
|
|
191
|
+
<tr><td><span class="method-POST">POST</span></td><td><code>/api/truth/reality/submit</code></td><td data-i18n="ep9">Submit an observed fact</td></tr>
|
|
192
|
+
<tr><td><span class="method-GET">GET</span></td><td><code>/api/truth/reality/:fact_key</code></td><td data-i18n="ep10">Verify a fact (consensus)</td></tr>
|
|
193
|
+
<tr><td><span class="method-POST">POST</span></td><td><code>/api/truth/reality/verify</code></td><td data-i18n="ep11">Bulk verify (up to 50 keys)</td></tr>
|
|
194
|
+
<tr><td><span class="method-GET">GET</span></td><td><code>/api/truth/profile/:domain</code></td><td data-i18n="ep12">Unified Truth profile</td></tr>
|
|
195
|
+
</tbody>
|
|
196
|
+
</table>
|
|
197
|
+
</section>
|
|
198
|
+
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<script>
|
|
202
|
+
const translations = {
|
|
203
|
+
en: {
|
|
204
|
+
title: "WAB Truth Layer",
|
|
205
|
+
subtitle: "The collective intelligence layer for AI agents. Semantic Memory · Temporal Trust · Action Graphs · Reality Anchor.",
|
|
206
|
+
back: "← Back to home", cta_features: "← WAB Advanced Features", cta_home: "Home",
|
|
207
|
+
f1_title: "Semantic Memory Network",
|
|
208
|
+
f1_lead: "Anonymized observations agents share about how sites behave for each intent. New agents inherit collective knowledge — no PII.",
|
|
209
|
+
f2_title: "Temporal Trust",
|
|
210
|
+
f2_lead: "Time-stability score. Detects fly-by-night domains, ranks established sites as flagship, flags volatility as suspect.",
|
|
211
|
+
f3_title: "Intent → Action Graph",
|
|
212
|
+
f3_lead: "Sites publish ActionGraphs per intent. Agents send a natural-language intent and receive a structured graph of nodes/edges.",
|
|
213
|
+
f4_title: "Reality Anchor",
|
|
214
|
+
f4_lead: "Agents cross-check facts across the WAB network. Defeats hallucination with multi-source consensus.",
|
|
215
|
+
f5_title: "Unified Truth Profile",
|
|
216
|
+
f5_lead: "Full Truth Layer view for a domain in one API call.",
|
|
217
|
+
domain: "Domain", intent_category: "Intent category", observation: "Observation",
|
|
218
|
+
intent_text: "Intent text", fact_key: "Fact key", fact_type: "Fact type", value: "Value (JSON)",
|
|
219
|
+
btn_observe: "Submit observation", btn_read: "Read summary",
|
|
220
|
+
btn_temporal: "Get temporal trust", btn_snapshot: "Record snapshot (demo)",
|
|
221
|
+
btn_resolve: "Resolve intent", btn_register_demo: "Register demo graph",
|
|
222
|
+
btn_submit: "Submit fact", btn_verify: "Verify consensus",
|
|
223
|
+
btn_profile: "Get Truth Profile",
|
|
224
|
+
api_title: "📘 API Reference", endpoint: "Endpoint", description: "Description",
|
|
225
|
+
ep1:"Submit anonymized observation", ep2:"Semantic summary for domain",
|
|
226
|
+
ep3:"Per-intent semantic summary", ep4:"Temporal trust profile",
|
|
227
|
+
ep5:"Record trust snapshot", ep6:"Register an ActionGraph",
|
|
228
|
+
ep7:"Fetch an ActionGraph", ep8:"Resolve intent text → graph",
|
|
229
|
+
ep9:"Submit an observed fact", ep10:"Verify a fact (consensus)",
|
|
230
|
+
ep11:"Bulk verify (up to 50 keys)", ep12:"Unified Truth profile",
|
|
231
|
+
},
|
|
232
|
+
ar: {
|
|
233
|
+
title: "طبقة الحقيقة WAB",
|
|
234
|
+
subtitle: "طبقة الذكاء الجماعي للوكلاء. ذاكرة دلالية · ثقة زمنية · رسوم الإجراءات · مرساة الواقع.",
|
|
235
|
+
back: "← العودة للرئيسية", cta_features: "← الميزات المتقدمة", cta_home: "الرئيسية",
|
|
236
|
+
f1_title: "شبكة الذاكرة الدلالية",
|
|
237
|
+
f1_lead: "ملاحظات مجهولة الهوية يشاركها الوكلاء عن سلوك المواقع لكل نية. الوكلاء الجدد يرثون المعرفة الجماعية — بدون بيانات شخصية.",
|
|
238
|
+
f2_title: "الثقة الزمنية",
|
|
239
|
+
f2_lead: "درجة الاستقرار عبر الزمن. تكشف المواقع المؤقتة، وتصنف المواقع الراسخة كـ flagship وتنبه على التقلب كـ suspect.",
|
|
240
|
+
f3_title: "النية → شجرة الإجراءات",
|
|
241
|
+
f3_lead: "المواقع تنشر ActionGraph لكل نية. الوكلاء يرسلون نية بلغة طبيعية ويستلمون شجرة منظمة من العقد والحواف.",
|
|
242
|
+
f4_title: "مرساة الواقع",
|
|
243
|
+
f4_lead: "الوكلاء يتحققون من الحقائق عبر شبكة WAB. تهزم الهلوسة باتفاق متعدد المصادر.",
|
|
244
|
+
f5_title: "ملف الحقيقة الموحّد",
|
|
245
|
+
f5_lead: "عرض كامل لطبقة الحقيقة لأي نطاق في طلب API واحد.",
|
|
246
|
+
domain: "النطاق", intent_category: "تصنيف النية", observation: "الملاحظة",
|
|
247
|
+
intent_text: "نص النية", fact_key: "مفتاح الحقيقة", fact_type: "نوع الحقيقة", value: "القيمة (JSON)",
|
|
248
|
+
btn_observe: "إرسال ملاحظة", btn_read: "قراءة الملخّص",
|
|
249
|
+
btn_temporal: "جلب الثقة الزمنية", btn_snapshot: "تسجيل لقطة (تجريبي)",
|
|
250
|
+
btn_resolve: "حلّ النية", btn_register_demo: "تسجيل رسم تجريبي",
|
|
251
|
+
btn_submit: "إرسال حقيقة", btn_verify: "التحقق من الإجماع",
|
|
252
|
+
btn_profile: "جلب ملف الحقيقة",
|
|
253
|
+
api_title: "📘 مرجع API", endpoint: "نقطة النهاية", description: "الوصف",
|
|
254
|
+
ep1:"إرسال ملاحظة مجهولة", ep2:"ملخّص دلالي للنطاق",
|
|
255
|
+
ep3:"ملخّص لنية محددة", ep4:"ملف الثقة الزمنية",
|
|
256
|
+
ep5:"تسجيل لقطة ثقة", ep6:"تسجيل ActionGraph",
|
|
257
|
+
ep7:"جلب ActionGraph", ep8:"حلّ نص النية ← شجرة",
|
|
258
|
+
ep9:"إرسال حقيقة مرصودة", ep10:"التحقق من الحقيقة (إجماع)",
|
|
259
|
+
ep11:"تحقق جماعي (50 مفتاح)", ep12:"ملف الحقيقة الموحّد",
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
function setLang(lang) {
|
|
264
|
+
const t = translations[lang]; if (!t) return;
|
|
265
|
+
document.documentElement.lang = lang;
|
|
266
|
+
document.documentElement.dir = (lang === 'ar') ? 'rtl' : 'ltr';
|
|
267
|
+
document.querySelectorAll('[data-i18n]').forEach(el => {
|
|
268
|
+
const k = el.getAttribute('data-i18n');
|
|
269
|
+
if (t[k]) el.textContent = t[k];
|
|
270
|
+
});
|
|
271
|
+
document.getElementById('btn-en').classList.toggle('active', lang === 'en');
|
|
272
|
+
document.getElementById('btn-ar').classList.toggle('active', lang === 'ar');
|
|
273
|
+
try { localStorage.setItem('wab_lang', lang); } catch {}
|
|
274
|
+
}
|
|
275
|
+
try {
|
|
276
|
+
const stored = localStorage.getItem('wab_lang');
|
|
277
|
+
if (stored && translations[stored]) setLang(stored);
|
|
278
|
+
} catch {}
|
|
279
|
+
|
|
280
|
+
function show(id, data) {
|
|
281
|
+
document.getElementById(id).textContent = (typeof data === 'string') ? data : JSON.stringify(data, null, 2);
|
|
282
|
+
}
|
|
283
|
+
async function jfetch(url, opts) {
|
|
284
|
+
try {
|
|
285
|
+
const r = await fetch(url, opts);
|
|
286
|
+
const text = await r.text();
|
|
287
|
+
let data; try { data = JSON.parse(text); } catch { data = text; }
|
|
288
|
+
return { status: r.status, data };
|
|
289
|
+
} catch (e) { return { status: 0, data: { error: String(e.message || e) } }; }
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
async function smObserve() {
|
|
293
|
+
const body = {
|
|
294
|
+
domain: smDomain(), intent_category: document.getElementById('sm-intent').value,
|
|
295
|
+
observation: document.getElementById('sm-obs').value, latency_ms: 80 + Math.floor(Math.random() * 400),
|
|
296
|
+
success: Math.random() > 0.15, agent_id: 'demo-' + Math.random().toString(36).slice(2, 9)
|
|
297
|
+
};
|
|
298
|
+
const r = await jfetch('/api/truth/memory/observe', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(body) });
|
|
299
|
+
show('sm-result', r.data);
|
|
300
|
+
}
|
|
301
|
+
async function smRead() {
|
|
302
|
+
const r = await jfetch('/api/truth/memory/' + encodeURIComponent(smDomain()));
|
|
303
|
+
show('sm-result', r.data);
|
|
304
|
+
}
|
|
305
|
+
function smDomain() { return document.getElementById('sm-domain').value.trim(); }
|
|
306
|
+
|
|
307
|
+
async function ttRead() {
|
|
308
|
+
const r = await jfetch('/api/truth/temporal/' + encodeURIComponent(document.getElementById('tt-domain').value.trim()));
|
|
309
|
+
show('tt-result', r.data);
|
|
310
|
+
}
|
|
311
|
+
async function ttSnapshot() {
|
|
312
|
+
const body = {
|
|
313
|
+
domain: document.getElementById('tt-domain').value.trim(),
|
|
314
|
+
score: 80 + Math.random()*20,
|
|
315
|
+
dns_stable: true,
|
|
316
|
+
manifest_hash: Math.random().toString(36).slice(2, 14),
|
|
317
|
+
observations: 1
|
|
318
|
+
};
|
|
319
|
+
const r = await jfetch('/api/truth/temporal/snapshot', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(body) });
|
|
320
|
+
show('tt-result', r.data);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
async function agResolve() {
|
|
324
|
+
const body = { domain: document.getElementById('ag-domain').value.trim(), intent_text: document.getElementById('ag-intent').value };
|
|
325
|
+
const r = await jfetch('/api/truth/action/resolve', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(body) });
|
|
326
|
+
show('ag-result', r.data);
|
|
327
|
+
}
|
|
328
|
+
async function agRegisterDemo() {
|
|
329
|
+
const body = {
|
|
330
|
+
domain: document.getElementById('ag-domain').value.trim(),
|
|
331
|
+
intent_key: 'activate_wab',
|
|
332
|
+
graph: {
|
|
333
|
+
keywords: ['activate','setup','integrate','install'],
|
|
334
|
+
nodes: [
|
|
335
|
+
{ id: 'start', type: 'start', label: 'Start' },
|
|
336
|
+
{ id: 'verify', type: 'requirement', label: 'Verify domain ownership' },
|
|
337
|
+
{ id: 'install', type: 'action', label: 'Install /wab-manifest.json' },
|
|
338
|
+
{ id: 'test', type: 'action', label: 'Run /api/activate/check' },
|
|
339
|
+
{ id: 'done', type: 'outcome', label: 'Activated' },
|
|
340
|
+
],
|
|
341
|
+
edges: [
|
|
342
|
+
{ from: 'start', to: 'verify' },
|
|
343
|
+
{ from: 'verify', to: 'install' },
|
|
344
|
+
{ from: 'install', to: 'test' },
|
|
345
|
+
{ from: 'test', to: 'done' },
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
const r = await jfetch('/api/truth/action/register', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(body) });
|
|
350
|
+
show('ag-result', r.data);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
async function raSubmit() {
|
|
354
|
+
let value; try { value = JSON.parse(document.getElementById('ra-value').value); } catch { value = document.getElementById('ra-value').value; }
|
|
355
|
+
const body = {
|
|
356
|
+
fact_key: document.getElementById('ra-key').value.trim(),
|
|
357
|
+
fact_type: document.getElementById('ra-type').value,
|
|
358
|
+
domain: document.getElementById('ra-domain').value.trim(),
|
|
359
|
+
value, agent_id: 'demo-' + Math.random().toString(36).slice(2, 9)
|
|
360
|
+
};
|
|
361
|
+
const r = await jfetch('/api/truth/reality/submit', { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(body) });
|
|
362
|
+
show('ra-result', r.data);
|
|
363
|
+
}
|
|
364
|
+
async function raVerify() {
|
|
365
|
+
const r = await jfetch('/api/truth/reality/' + encodeURIComponent(document.getElementById('ra-key').value.trim()));
|
|
366
|
+
show('ra-result', r.data);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
async function prRead() {
|
|
370
|
+
const r = await jfetch('/api/truth/profile/' + encodeURIComponent(document.getElementById('pr-domain').value.trim()));
|
|
371
|
+
show('pr-result', r.data);
|
|
372
|
+
}
|
|
373
|
+
</script>
|
|
374
|
+
</body>
|
|
375
|
+
</html>
|