web-agent-bridge 3.2.0 → 3.4.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 -72
- package/README.ar.md +1304 -1152
- package/README.md +298 -1635
- package/bin/agent-runner.js +474 -474
- package/bin/cli.js +237 -138
- package/bin/wab-init.js +223 -0
- package/bin/wab.js +80 -80
- package/examples/azure-dns-wab.js +83 -0
- package/examples/bidi-agent.js +119 -119
- package/examples/cloudflare-wab-dns.js +121 -0
- package/examples/cpanel-wab-dns.js +114 -0
- package/examples/cross-site-agent.js +91 -91
- package/examples/dns-discovery-agent.js +166 -0
- package/examples/gcp-dns-wab.js +76 -0
- package/examples/governance-agent.js +169 -0
- package/examples/mcp-agent.js +94 -94
- package/examples/next-app-router/README.md +44 -44
- package/examples/plesk-wab-dns.js +103 -0
- package/examples/puppeteer-agent.js +108 -108
- package/examples/route53-wab-dns.js +144 -0
- package/examples/saas-dashboard/README.md +55 -55
- package/examples/safe-mode-agent.js +96 -0
- package/examples/shopify-hydrogen/README.md +74 -74
- package/examples/vision-agent.js +171 -171
- package/examples/wab-sign.js +74 -0
- package/examples/wab-verify.js +60 -0
- package/examples/wordpress-elementor/README.md +77 -77
- package/package.json +19 -6
- 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 -0
- package/public/.well-known/wab.json +28 -0
- package/public/activate.html +368 -0
- package/public/adoption-metrics.html +188 -0
- package/public/agent-workspace.html +349 -349
- package/public/ai.html +198 -198
- package/public/api.html +413 -412
- package/public/azure-dns-integration.html +289 -0
- package/public/browser.html +486 -486
- package/public/cloudflare-integration.html +380 -0
- package/public/commander-dashboard.html +243 -243
- package/public/cookies.html +210 -210
- package/public/cpanel-integration.html +398 -0
- package/public/css/agent-workspace.css +1713 -1713
- package/public/css/premium.css +317 -317
- package/public/css/styles.css +1263 -1235
- package/public/dashboard.html +707 -706
- package/public/dns.html +436 -0
- package/public/docs.html +588 -587
- package/public/feed.xml +89 -89
- package/public/gcp-dns-integration.html +318 -0
- package/public/growth.html +465 -463
- package/public/index.html +1266 -982
- package/public/integrations.html +556 -0
- package/public/js/activate.js +145 -0
- package/public/js/agent-workspace.js +1740 -1740
- package/public/js/auth-nav.js +65 -31
- package/public/js/auth-redirect.js +12 -12
- package/public/js/cookie-consent.js +56 -56
- package/public/js/dns.js +438 -0
- package/public/js/wab-demo-page.js +721 -721
- package/public/js/ws-client.js +74 -74
- 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/openapi.json +669 -580
- package/public/phone-shield.html +281 -0
- package/public/plesk-integration.html +375 -0
- 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 -0
- package/public/provider-sandbox.html +134 -0
- package/public/providers.html +359 -0
- package/public/register.html +105 -105
- package/public/registrar-integrations.html +141 -0
- package/public/robots.txt +99 -87
- package/public/route53-integration.html +531 -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 -0
- package/public/shieldqr.html +231 -0
- package/public/sitemap.xml +6 -0
- package/public/terms.html +256 -256
- package/public/wab-trust.html +200 -0
- package/public/wab-vs-protocols.html +210 -0
- package/public/whitepaper.html +449 -0
- package/script/ai-agent-bridge.js +1754 -1754
- package/sdk/README.md +99 -99
- package/sdk/agent-mesh.js +449 -449
- package/sdk/auto-discovery.js +288 -0
- package/sdk/commander.js +262 -262
- package/sdk/governance.js +262 -0
- package/sdk/index.d.ts +464 -464
- package/sdk/index.js +25 -1
- package/sdk/multi-agent.js +318 -318
- package/sdk/package.json +2 -2
- package/sdk/safe-mode.js +221 -0
- package/sdk/safety-shield.js +219 -0
- package/sdk/schema-discovery.js +83 -83
- package/server/adapters/index.js +520 -520
- package/server/config/plans.js +367 -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 +670 -427
- package/server/llm/index.js +404 -404
- package/server/middleware/adminAuth.js +35 -35
- 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 -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/007_governance.sql +106 -0
- package/server/migrations/008_plans.sql +144 -0
- package/server/migrations/009_shieldqr.sql +30 -0
- package/server/migrations/010_extended_trust.sql +33 -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 -681
- 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/admin-plans.js +76 -0
- package/server/routes/admin-premium.js +673 -671
- package/server/routes/admin-shieldqr.js +90 -0
- package/server/routes/admin-trust-monitor.js +83 -0
- package/server/routes/admin.js +549 -261
- package/server/routes/ads.js +130 -130
- package/server/routes/agent-workspace.js +540 -540
- package/server/routes/api.js +150 -150
- package/server/routes/auth.js +71 -71
- package/server/routes/billing.js +57 -45
- package/server/routes/commander.js +316 -316
- package/server/routes/demo-showcase.js +332 -332
- package/server/routes/demo-store.js +154 -0
- package/server/routes/discovery.js +2348 -417
- package/server/routes/gateway.js +173 -157
- package/server/routes/governance.js +208 -0
- package/server/routes/license.js +251 -240
- package/server/routes/mesh.js +469 -469
- package/server/routes/noscript.js +543 -543
- package/server/routes/plans.js +33 -0
- package/server/routes/premium-v2.js +686 -686
- package/server/routes/premium.js +724 -724
- package/server/routes/providers.js +650 -0
- package/server/routes/runtime.js +2148 -2147
- package/server/routes/shieldqr.js +88 -0
- package/server/routes/sovereign.js +465 -385
- package/server/routes/universal.js +200 -185
- package/server/routes/wab-api.js +850 -501
- 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/security/cross-site-redactor.js +196 -0
- package/server/security/dry-run.js +180 -0
- package/server/security/human-gate-rate-limit.js +147 -0
- package/server/security/human-gate-transports.js +178 -0
- package/server/security/human-gate.js +281 -0
- package/server/security/index.js +368 -368
- package/server/security/intent-engine.js +245 -0
- package/server/security/reward-guard.js +171 -0
- package/server/security/rollback-store.js +239 -0
- package/server/security/token-scope.js +404 -0
- package/server/security/url-policy.js +139 -0
- package/server/services/agent-chat.js +506 -506
- package/server/services/agent-learning.js +601 -575
- package/server/services/agent-memory.js +625 -625
- package/server/services/agent-mesh.js +555 -539
- package/server/services/agent-symphony.js +717 -717
- package/server/services/agent-tasks.js +1807 -1807
- package/server/services/api-key-engine.js +292 -261
- 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 -204
- package/server/services/governance.js +466 -0
- 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/plans.js +214 -0
- package/server/services/plugins.js +771 -771
- package/server/services/premium.js +1 -1
- package/server/services/price-intelligence.js +566 -566
- package/server/services/price-shield.js +1137 -1137
- package/server/services/provider-clients.js +740 -0
- 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/shieldqr.js +322 -0
- package/server/services/sovereign-shield.js +542 -0
- package/server/services/ssl-inspector.js +42 -0
- package/server/services/ssl-monitor.js +167 -0
- package/server/services/stripe.js +205 -192
- package/server/services/swarm.js +788 -788
- package/server/services/universal-scraper.js +662 -661
- package/server/services/verification.js +481 -481
- package/server/services/vision.js +1163 -1163
- package/server/services/wab-crypto.js +178 -0
- package/server/utils/cache.js +125 -125
- package/server/utils/migrate.js +81 -81
- package/server/utils/safe-fetch.js +228 -0
- 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/public/score.html +0 -263
- package/server/migrations/006_growth_suite.sql +0 -138
- package/server/routes/growth.js +0 -962
- package/server/services/fairness-engine.js +0 -409
- package/server/services/fairness.js +0 -420
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" dir="ltr">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>WAB DNS Discovery Provider Onboarding</title>
|
|
7
|
+
<meta name="description" content="Integrate WAB DNS Discovery into DNS providers and registrars with one-click enable/disable flow.">
|
|
8
|
+
<link rel="stylesheet" href="/css/styles.css?v=3.3.0">
|
|
9
|
+
<style>
|
|
10
|
+
body { background:#0a1222; color:#e6edf8; }
|
|
11
|
+
.hero { padding:110px 24px 40px; text-align:center; }
|
|
12
|
+
.hero h1 { font-size:clamp(1.9rem,4vw,3rem); margin-bottom:10px; }
|
|
13
|
+
.hero p { color:#9fb1d3; max-width:820px; margin:0 auto; line-height:1.7; }
|
|
14
|
+
.wrap { max-width:1100px; margin:0 auto; padding:0 20px 70px; }
|
|
15
|
+
.grid { display:grid; gap:14px; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); }
|
|
16
|
+
.card { background:linear-gradient(180deg,rgba(17,24,39,.9),rgba(12,18,31,.96)); border:1px solid rgba(148,163,184,.2); border-radius:14px; padding:16px; }
|
|
17
|
+
.card h3 { margin:0 0 8px; color:#fcd34d; }
|
|
18
|
+
.card p, .card li { color:#c7d2ea; line-height:1.65; font-size:.93rem; }
|
|
19
|
+
.card ul { margin:6px 0 0 20px; }
|
|
20
|
+
.badge { display:inline-block; margin:6px 0; padding:4px 9px; border-radius:999px; font-size:.73rem; font-weight:700; color:#fde68a; border:1px solid rgba(250,204,21,.45); background:rgba(250,204,21,.12); }
|
|
21
|
+
pre, code { font-family:Consolas, Menlo, Monaco, monospace; }
|
|
22
|
+
pre { background:#020617; border:1px solid rgba(148,163,184,.25); border-radius:10px; padding:11px; color:#c4b5fd; overflow:auto; font-size:.82rem; line-height:1.5; }
|
|
23
|
+
.actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
|
|
24
|
+
.actions a { text-decoration:none; }
|
|
25
|
+
.btn-mini { display:inline-block; padding:8px 12px; border-radius:9px; font-size:.83rem; font-weight:700; }
|
|
26
|
+
.btn-primary { background:linear-gradient(135deg,#f59e0b,#b45309); color:#fff; }
|
|
27
|
+
.btn-secondary { background:rgba(148,163,184,.16); border:1px solid rgba(148,163,184,.35); color:#e6edf8; }
|
|
28
|
+
</style>
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<section class="hero">
|
|
32
|
+
<h1>Provider Onboarding: One-Click WAB DNS Discovery</h1>
|
|
33
|
+
<p>
|
|
34
|
+
Add WAB DNS Discovery to your DNS platform or registrar panel so domain owners can enable or disable AI discoverability
|
|
35
|
+
with a single toggle, just like SSL activation.
|
|
36
|
+
</p>
|
|
37
|
+
</section>
|
|
38
|
+
|
|
39
|
+
<div class="wrap">
|
|
40
|
+
<div class="grid">
|
|
41
|
+
<div class="card">
|
|
42
|
+
<h3>1) Fetch Protocol Manifest</h3>
|
|
43
|
+
<span class="badge">Machine contract</span>
|
|
44
|
+
<pre>GET /api/discovery/provider/manifest</pre>
|
|
45
|
+
<p>Use this endpoint to lock integration against a stable protocol definition.</p>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div class="card">
|
|
49
|
+
<h3>2) Build TXT Record Template</h3>
|
|
50
|
+
<span class="badge">Per-domain payload</span>
|
|
51
|
+
<pre>GET /api/discovery/provider/record-template?domain=example.com</pre>
|
|
52
|
+
<p>Returns ready-to-write values for DNS API calls in your enable-toggle flow.</p>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="card">
|
|
56
|
+
<h3>3) Verify Status</h3>
|
|
57
|
+
<span class="badge">UI state source</span>
|
|
58
|
+
<pre>GET /api/discovery/provider/status?domain=example.com</pre>
|
|
59
|
+
<p>Map status to your UI toggle badges:</p>
|
|
60
|
+
<ul>
|
|
61
|
+
<li>enabled: DNS + endpoint verified</li>
|
|
62
|
+
<li>partial: DNS found, endpoint issue</li>
|
|
63
|
+
<li>disabled: no valid TXT record</li>
|
|
64
|
+
</ul>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="card">
|
|
68
|
+
<h3>4) Batch Verification + Callback</h3>
|
|
69
|
+
<span class="badge">Registrar dashboards</span>
|
|
70
|
+
<pre>POST /api/discovery/provider/verify-batch
|
|
71
|
+
{
|
|
72
|
+
"domains": ["example.com", "shop.example.com"],
|
|
73
|
+
"include_agent_run": false,
|
|
74
|
+
"callback_url": "https://provider.example/webhooks/wab",
|
|
75
|
+
"callback_secret": "shared-secret"
|
|
76
|
+
}</pre>
|
|
77
|
+
<p>
|
|
78
|
+
Optional callback pushes final result to your webhook endpoint with request id and optional HMAC signature.
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="card">
|
|
83
|
+
<h3>5) Webhook Signature Verification</h3>
|
|
84
|
+
<span class="badge">Security</span>
|
|
85
|
+
<p>
|
|
86
|
+
Verify the <code>x-wab-signature</code> header on your callback endpoint to confirm the request came from WAB.
|
|
87
|
+
The signature is <code>HMAC-SHA256(requestBody, callbackSecret)</code> encoded as hex.
|
|
88
|
+
</p>
|
|
89
|
+
<p><strong>Node.js</strong></p>
|
|
90
|
+
<pre>const crypto = require('crypto');
|
|
91
|
+
|
|
92
|
+
function verifyWabSignature(rawBody, receivedSig, secret) {
|
|
93
|
+
const expected = crypto
|
|
94
|
+
.createHmac('sha256', secret)
|
|
95
|
+
.update(rawBody) // raw Buffer or string
|
|
96
|
+
.digest('hex');
|
|
97
|
+
// constant-time compare to prevent timing attacks
|
|
98
|
+
return crypto.timingSafeEqual(
|
|
99
|
+
Buffer.from(expected, 'utf8'),
|
|
100
|
+
Buffer.from(receivedSig, 'utf8')
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Express example
|
|
105
|
+
app.post('/webhooks/wab', express.raw({ type: '*/*' }), (req, res) => {
|
|
106
|
+
const sig = req.headers['x-wab-signature'];
|
|
107
|
+
if (!verifyWabSignature(req.body, sig, process.env.WAB_CALLBACK_SECRET)) {
|
|
108
|
+
return res.status(401).send('Invalid signature');
|
|
109
|
+
}
|
|
110
|
+
const payload = JSON.parse(req.body.toString());
|
|
111
|
+
// … process payload
|
|
112
|
+
res.sendStatus(200);
|
|
113
|
+
});</pre>
|
|
114
|
+
<p><strong>Python (Flask)</strong></p>
|
|
115
|
+
<pre>import hmac, hashlib
|
|
116
|
+
from flask import Flask, request, abort
|
|
117
|
+
|
|
118
|
+
app = Flask(__name__)
|
|
119
|
+
WAB_SECRET = os.environ['WAB_CALLBACK_SECRET']
|
|
120
|
+
|
|
121
|
+
@app.route('/webhooks/wab', methods=['POST'])
|
|
122
|
+
def wab_webhook():
|
|
123
|
+
sig = request.headers.get('x-wab-signature', '')
|
|
124
|
+
expected = hmac.new(
|
|
125
|
+
WAB_SECRET.encode(), request.data, hashlib.sha256
|
|
126
|
+
).hexdigest()
|
|
127
|
+
if not hmac.compare_digest(expected, sig):
|
|
128
|
+
abort(401)
|
|
129
|
+
payload = request.get_json(force=True)
|
|
130
|
+
# … process payload
|
|
131
|
+
return '', 200</pre>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div class="card">
|
|
135
|
+
<h3>Enable/Disable Flow</h3>
|
|
136
|
+
<span class="badge">One-click UX</span>
|
|
137
|
+
<ul>
|
|
138
|
+
<li>Enable: write TXT, verify, show enabled</li>
|
|
139
|
+
<li>Disable: delete TXT, verify, show disabled</li>
|
|
140
|
+
<li>Retry verification until propagation converges</li>
|
|
141
|
+
</ul>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div class="card">
|
|
145
|
+
<h3>Integration Endpoints</h3>
|
|
146
|
+
<pre>/api/discovery/provider/manifest
|
|
147
|
+
/api/discovery/provider/record-template
|
|
148
|
+
/api/discovery/provider/enable-plan
|
|
149
|
+
/api/discovery/provider/status
|
|
150
|
+
/api/discovery/provider/verify-batch</pre>
|
|
151
|
+
<div class="actions">
|
|
152
|
+
<a class="btn-mini btn-primary" href="/api/discovery/provider/manifest" target="_blank" rel="noopener">Open Manifest</a>
|
|
153
|
+
<a class="btn-mini btn-secondary" href="/api/discovery/provider/record-template?domain=webagentbridge.com" target="_blank" rel="noopener">Open Template Example</a>
|
|
154
|
+
<a class="btn-mini btn-secondary" href="/provider-sandbox">Open Provider Sandbox</a>
|
|
155
|
+
<a class="btn-mini btn-primary" href="/cloudflare-integration">Cloudflare One-Click</a>
|
|
156
|
+
<a class="btn-mini btn-primary" href="/cpanel-integration">cPanel One-Click</a>
|
|
157
|
+
<a class="btn-mini btn-primary" href="/route53-integration">Route 53 One-Click</a>
|
|
158
|
+
<a class="btn-mini btn-primary" href="/plesk-integration">Plesk One-Click</a>
|
|
159
|
+
<a class="btn-mini btn-primary" href="/gcp-dns-integration">Google Cloud DNS</a>
|
|
160
|
+
<a class="btn-mini btn-primary" href="/azure-dns-integration">Azure DNS One-Click</a>
|
|
161
|
+
<a class="btn-mini btn-primary" href="/registrar-integrations">GoDaddy / Namecheap CLI</a>
|
|
162
|
+
<a class="btn-mini btn-secondary" href="/adoption-metrics">Adoption Metrics</a>
|
|
163
|
+
<a class="btn-mini btn-primary" href="/wab-trust">Trust Layer (v1.3)</a>
|
|
164
|
+
<a class="btn-mini btn-secondary" href="/wab-vs-protocols">WAB vs Other Protocols</a>
|
|
165
|
+
<a class="btn-mini btn-secondary" href="/downloads/wab-dns-provider.postman_collection.json" target="_blank" rel="noopener">Download Postman Collection</a>
|
|
166
|
+
<a class="btn-mini btn-secondary" href="/dns">Open DNS Page</a>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</body>
|
|
172
|
+
</html>
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" dir="ltr">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>WAB Provider Sandbox</title>
|
|
7
|
+
<meta name="description" content="Interactive sandbox for DNS providers and registrars to test WAB DNS Discovery APIs.">
|
|
8
|
+
<link rel="stylesheet" href="/css/styles.css?v=3.3.0">
|
|
9
|
+
<style>
|
|
10
|
+
body { background:#081123; color:#e8efff; }
|
|
11
|
+
.hero { padding:100px 20px 30px; text-align:center; }
|
|
12
|
+
.hero h1 { font-size:clamp(1.8rem,4vw,2.8rem); margin-bottom:8px; }
|
|
13
|
+
.hero p { color:#9eb1d8; max-width:820px; margin:0 auto; }
|
|
14
|
+
.wrap { max-width:1100px; margin:0 auto; padding:0 18px 70px; }
|
|
15
|
+
.panel { background:linear-gradient(180deg,rgba(17,24,39,.92),rgba(10,16,30,.96)); border:1px solid rgba(148,163,184,.2); border-radius:14px; padding:14px; margin-bottom:14px; }
|
|
16
|
+
.panel h3 { margin:0 0 8px; color:#fcd34d; }
|
|
17
|
+
.row { display:grid; grid-template-columns:2fr 1fr; gap:10px; }
|
|
18
|
+
@media (max-width:760px) { .row { grid-template-columns:1fr; } }
|
|
19
|
+
label { display:block; font-size:.8rem; color:#a8b7d7; margin-bottom:5px; }
|
|
20
|
+
input, select, textarea { width:100%; background:#0b162a; border:1px solid rgba(148,163,184,.28); color:#e8efff; border-radius:10px; padding:10px; font-family:Consolas, monospace; font-size:.85rem; }
|
|
21
|
+
textarea { min-height:90px; }
|
|
22
|
+
.actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
|
|
23
|
+
button { background:linear-gradient(135deg,#f59e0b,#b45309); color:#fff; border:none; border-radius:10px; padding:9px 12px; cursor:pointer; font-weight:700; font-size:.82rem; }
|
|
24
|
+
button.alt { background:linear-gradient(135deg,#334155,#1f2937); }
|
|
25
|
+
pre { background:#020617; border:1px solid rgba(148,163,184,.26); border-radius:10px; padding:12px; color:#c4b5fd; overflow:auto; min-height:180px; }
|
|
26
|
+
.hint { color:#9eb1d8; font-size:.84rem; }
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<section class="hero">
|
|
31
|
+
<h1>Provider Sandbox</h1>
|
|
32
|
+
<p>Run provider integration APIs end-to-end: manifest, record template, status, one-click plan, and batch verify.</p>
|
|
33
|
+
</section>
|
|
34
|
+
|
|
35
|
+
<div class="wrap">
|
|
36
|
+
<div class="panel">
|
|
37
|
+
<h3>Request Builder</h3>
|
|
38
|
+
<div class="row">
|
|
39
|
+
<div>
|
|
40
|
+
<label>Domain</label>
|
|
41
|
+
<input id="domain" value="webagentbridge.com" placeholder="example.com">
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<label>Action</label>
|
|
45
|
+
<select id="action">
|
|
46
|
+
<option value="enable">enable</option>
|
|
47
|
+
<option value="disable">disable</option>
|
|
48
|
+
</select>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="row" style="margin-top:8px;">
|
|
52
|
+
<div>
|
|
53
|
+
<label>Batch Domains (comma separated)</label>
|
|
54
|
+
<input id="batchDomains" value="webagentbridge.com, example.com">
|
|
55
|
+
</div>
|
|
56
|
+
<div>
|
|
57
|
+
<label>Include Agent Run</label>
|
|
58
|
+
<select id="includeAgentRun">
|
|
59
|
+
<option value="false" selected>false</option>
|
|
60
|
+
<option value="true">true</option>
|
|
61
|
+
</select>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="actions">
|
|
65
|
+
<button onclick="runManifest()">Manifest</button>
|
|
66
|
+
<button onclick="runTemplate()">Record Template</button>
|
|
67
|
+
<button onclick="runStatus()">Status</button>
|
|
68
|
+
<button onclick="runPlan()">Enable/Disable Plan</button>
|
|
69
|
+
<button onclick="runBatch()">Verify Batch</button>
|
|
70
|
+
<button class="alt" onclick="clearOut()">Clear</button>
|
|
71
|
+
</div>
|
|
72
|
+
<p class="hint">Tip: use this page during provider integration QA before shipping one-click toggle in production.</p>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="panel">
|
|
76
|
+
<h3>Response</h3>
|
|
77
|
+
<pre id="out">{}</pre>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<script>
|
|
82
|
+
async function call(url, opts) {
|
|
83
|
+
const out = document.getElementById('out');
|
|
84
|
+
out.textContent = 'Loading ' + url + ' ...';
|
|
85
|
+
try {
|
|
86
|
+
const res = await fetch(url, opts || {});
|
|
87
|
+
const data = await res.json().catch(() => ({}));
|
|
88
|
+
out.textContent = JSON.stringify({ http_status: res.status, data: data }, null, 2);
|
|
89
|
+
} catch (err) {
|
|
90
|
+
out.textContent = JSON.stringify({ error: String(err) }, null, 2);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function getDomain() {
|
|
95
|
+
return (document.getElementById('domain').value || '').trim();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function runManifest() {
|
|
99
|
+
call('/api/discovery/provider/manifest');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function runTemplate() {
|
|
103
|
+
const d = getDomain();
|
|
104
|
+
call('/api/discovery/provider/record-template?domain=' + encodeURIComponent(d));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function runStatus() {
|
|
108
|
+
const d = getDomain();
|
|
109
|
+
call('/api/discovery/provider/status?domain=' + encodeURIComponent(d));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function runPlan() {
|
|
113
|
+
const d = getDomain();
|
|
114
|
+
const action = document.getElementById('action').value;
|
|
115
|
+
call('/api/discovery/provider/enable-plan?domain=' + encodeURIComponent(d) + '&action=' + encodeURIComponent(action));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function runBatch() {
|
|
119
|
+
const raw = (document.getElementById('batchDomains').value || '');
|
|
120
|
+
const domains = raw.split(',').map((s) => s.trim()).filter(Boolean);
|
|
121
|
+
const includeAgentRun = document.getElementById('includeAgentRun').value === 'true';
|
|
122
|
+
call('/api/discovery/provider/verify-batch', {
|
|
123
|
+
method: 'POST',
|
|
124
|
+
headers: { 'content-type': 'application/json', accept: 'application/json' },
|
|
125
|
+
body: JSON.stringify({ domains: domains, include_agent_run: includeAgentRun })
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function clearOut() {
|
|
130
|
+
document.getElementById('out').textContent = '{}';
|
|
131
|
+
}
|
|
132
|
+
</script>
|
|
133
|
+
</body>
|
|
134
|
+
</html>
|