web-agent-bridge 1.1.2 → 2.0.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 +21 -21
- package/README.ar.md +446 -446
- package/README.md +780 -844
- package/bin/cli.js +80 -80
- package/bin/wab.js +80 -80
- package/examples/bidi-agent.js +119 -119
- package/examples/mcp-agent.js +94 -94
- package/examples/next-app-router/README.md +44 -0
- package/examples/puppeteer-agent.js +108 -108
- package/examples/saas-dashboard/README.md +55 -0
- package/examples/shopify-hydrogen/README.md +74 -0
- package/examples/vision-agent.js +171 -171
- package/examples/wordpress-elementor/README.md +77 -0
- package/package.json +69 -78
- package/public/.well-known/ai-assets.json +59 -0
- package/public/admin/login.html +84 -84
- package/public/ai.html +196 -0
- package/public/cookies.html +208 -208
- package/public/css/premium.css +317 -0
- package/public/css/styles.css +1235 -1235
- package/public/dashboard.html +704 -704
- package/public/demo.html +259 -0
- package/public/docs.html +585 -585
- package/public/feed.xml +89 -0
- package/public/index.html +495 -332
- package/public/js/auth-nav.js +31 -31
- package/public/js/auth-redirect.js +12 -12
- package/public/js/cookie-consent.js +56 -56
- package/public/js/wab-demo-page.js +721 -0
- package/public/js/ws-client.js +74 -74
- package/public/llms-full.txt +309 -0
- package/public/llms.txt +85 -0
- package/public/login.html +83 -83
- package/public/openapi.json +580 -0
- package/public/premium-dashboard.html +2487 -0
- package/public/premium.html +791 -0
- package/public/privacy.html +295 -295
- package/public/register.html +103 -103
- package/public/robots.txt +87 -0
- package/public/script/wab-consent.d.ts +36 -0
- package/public/script/wab-consent.js +104 -0
- package/public/script/wab-schema.js +131 -0
- package/public/script/wab.d.ts +108 -0
- package/public/script/wab.min.js +234 -0
- package/public/sitemap.xml +93 -0
- package/public/terms.html +254 -254
- package/public/video/tutorial.mp4 +0 -0
- package/script/ai-agent-bridge.js +1558 -1513
- package/sdk/README.md +55 -55
- package/sdk/index.d.ts +118 -0
- package/sdk/index.js +257 -203
- package/sdk/package.json +14 -14
- package/sdk/schema-discovery.js +83 -0
- package/server/config/secrets.js +94 -92
- package/server/index.js +0 -9
- package/server/middleware/adminAuth.js +30 -30
- package/server/middleware/auth.js +41 -41
- package/server/middleware/rateLimits.js +24 -24
- package/server/migrations/001_add_analytics_indexes.sql +7 -7
- package/server/migrations/002_premium_features.sql +418 -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 +561 -561
- package/server/routes/admin-premium.js +671 -0
- package/server/routes/admin.js +247 -247
- package/server/routes/api.js +131 -138
- package/server/routes/auth.js +51 -51
- package/server/routes/billing.js +45 -45
- package/server/routes/discovery.js +406 -329
- package/server/routes/license.js +240 -240
- package/server/routes/noscript.js +543 -543
- package/server/routes/premium-v2.js +686 -0
- package/server/routes/premium.js +724 -0
- package/server/routes/wab-api.js +476 -476
- package/server/services/agent-memory.js +625 -0
- package/server/services/email.js +204 -204
- package/server/services/fairness.js +420 -420
- package/server/services/plugins.js +747 -0
- package/server/services/premium.js +1883 -0
- package/server/services/self-healing.js +843 -0
- package/server/services/stripe.js +192 -192
- package/server/services/swarm.js +788 -0
- package/server/services/vision.js +871 -0
- package/server/utils/cache.js +125 -125
- package/server/utils/migrate.js +81 -81
- package/server/utils/secureFields.js +50 -50
- package/server/ws.js +101 -101
- package/docs/DEPLOY.md +0 -118
- package/docs/SPEC.md +0 -1540
- package/wab-mcp-adapter/README.md +0 -136
- package/wab-mcp-adapter/index.js +0 -555
- package/wab-mcp-adapter/package.json +0 -17
package/public/login.html
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
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.0">
|
|
6
|
-
<title>Sign In — Web Agent Bridge</title>
|
|
7
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
10
|
-
<link rel="stylesheet" href="/css/styles.css">
|
|
11
|
-
<script src="/js/auth-redirect.js"></script>
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<div class="auth-page">
|
|
15
|
-
<div class="auth-card fade-in">
|
|
16
|
-
<div style="text-align:center; margin-bottom:32px;">
|
|
17
|
-
<a href="/" class="navbar-brand" style="justify-content:center;">
|
|
18
|
-
<div class="brand-icon">⚡</div>
|
|
19
|
-
<span>WAB</span>
|
|
20
|
-
</a>
|
|
21
|
-
</div>
|
|
22
|
-
<h1 style="text-align:center;">Welcome back</h1>
|
|
23
|
-
<p class="subtitle" style="text-align:center;">Sign in to your account</p>
|
|
24
|
-
|
|
25
|
-
<div class="alert alert-error" id="errorAlert"></div>
|
|
26
|
-
|
|
27
|
-
<form id="loginForm">
|
|
28
|
-
<div class="form-group">
|
|
29
|
-
<label for="email">Email</label>
|
|
30
|
-
<input type="email" id="email" class="form-input" placeholder="you@example.com" required>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="form-group">
|
|
33
|
-
<label for="password">Password</label>
|
|
34
|
-
<input type="password" id="password" class="form-input" placeholder="Your password" required>
|
|
35
|
-
</div>
|
|
36
|
-
<button type="submit" class="btn btn-primary btn-lg">Sign In</button>
|
|
37
|
-
</form>
|
|
38
|
-
|
|
39
|
-
<div class="auth-footer">
|
|
40
|
-
Don't have an account? <a href="/register">Create one</a>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<script>
|
|
46
|
-
if (localStorage.getItem('wab_token')) {
|
|
47
|
-
window.location.replace(typeof wabGetPostAuthRedirect === 'function' ? wabGetPostAuthRedirect() : '/dashboard');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
document.getElementById('loginForm').addEventListener('submit', async (e) => {
|
|
51
|
-
e.preventDefault();
|
|
52
|
-
const errorEl = document.getElementById('errorAlert');
|
|
53
|
-
errorEl.style.display = 'none';
|
|
54
|
-
|
|
55
|
-
const email = document.getElementById('email').value;
|
|
56
|
-
const password = document.getElementById('password').value;
|
|
57
|
-
|
|
58
|
-
try {
|
|
59
|
-
const res = await fetch('/api/auth/login', {
|
|
60
|
-
method: 'POST',
|
|
61
|
-
headers: { 'Content-Type': 'application/json' },
|
|
62
|
-
body: JSON.stringify({ email, password })
|
|
63
|
-
});
|
|
64
|
-
const data = await res.json();
|
|
65
|
-
|
|
66
|
-
if (!res.ok) {
|
|
67
|
-
errorEl.textContent = data.error || 'Login failed';
|
|
68
|
-
errorEl.style.display = 'block';
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
localStorage.setItem('wab_token', data.token);
|
|
73
|
-
localStorage.setItem('wab_user', JSON.stringify(data.user));
|
|
74
|
-
window.location.href = typeof wabGetPostAuthRedirect === 'function' ? wabGetPostAuthRedirect() : '/dashboard';
|
|
75
|
-
} catch (err) {
|
|
76
|
-
errorEl.textContent = 'Connection error. Please try again.';
|
|
77
|
-
errorEl.style.display = 'block';
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
</script>
|
|
81
|
-
<script src="/js/cookie-consent.js"></script>
|
|
82
|
-
</body>
|
|
83
|
-
</html>
|
|
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.0">
|
|
6
|
+
<title>Sign In — Web Agent Bridge</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
10
|
+
<link rel="stylesheet" href="/css/styles.css">
|
|
11
|
+
<script src="/js/auth-redirect.js"></script>
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<div class="auth-page">
|
|
15
|
+
<div class="auth-card fade-in">
|
|
16
|
+
<div style="text-align:center; margin-bottom:32px;">
|
|
17
|
+
<a href="/" class="navbar-brand" style="justify-content:center;">
|
|
18
|
+
<div class="brand-icon">⚡</div>
|
|
19
|
+
<span>WAB</span>
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
<h1 style="text-align:center;">Welcome back</h1>
|
|
23
|
+
<p class="subtitle" style="text-align:center;">Sign in to your account</p>
|
|
24
|
+
|
|
25
|
+
<div class="alert alert-error" id="errorAlert"></div>
|
|
26
|
+
|
|
27
|
+
<form id="loginForm">
|
|
28
|
+
<div class="form-group">
|
|
29
|
+
<label for="email">Email</label>
|
|
30
|
+
<input type="email" id="email" class="form-input" placeholder="you@example.com" required>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="form-group">
|
|
33
|
+
<label for="password">Password</label>
|
|
34
|
+
<input type="password" id="password" class="form-input" placeholder="Your password" required>
|
|
35
|
+
</div>
|
|
36
|
+
<button type="submit" class="btn btn-primary btn-lg">Sign In</button>
|
|
37
|
+
</form>
|
|
38
|
+
|
|
39
|
+
<div class="auth-footer">
|
|
40
|
+
Don't have an account? <a href="/register">Create one</a>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
if (localStorage.getItem('wab_token')) {
|
|
47
|
+
window.location.replace(typeof wabGetPostAuthRedirect === 'function' ? wabGetPostAuthRedirect() : '/dashboard');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
document.getElementById('loginForm').addEventListener('submit', async (e) => {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
const errorEl = document.getElementById('errorAlert');
|
|
53
|
+
errorEl.style.display = 'none';
|
|
54
|
+
|
|
55
|
+
const email = document.getElementById('email').value;
|
|
56
|
+
const password = document.getElementById('password').value;
|
|
57
|
+
|
|
58
|
+
try {
|
|
59
|
+
const res = await fetch('/api/auth/login', {
|
|
60
|
+
method: 'POST',
|
|
61
|
+
headers: { 'Content-Type': 'application/json' },
|
|
62
|
+
body: JSON.stringify({ email, password })
|
|
63
|
+
});
|
|
64
|
+
const data = await res.json();
|
|
65
|
+
|
|
66
|
+
if (!res.ok) {
|
|
67
|
+
errorEl.textContent = data.error || 'Login failed';
|
|
68
|
+
errorEl.style.display = 'block';
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
localStorage.setItem('wab_token', data.token);
|
|
73
|
+
localStorage.setItem('wab_user', JSON.stringify(data.user));
|
|
74
|
+
window.location.href = typeof wabGetPostAuthRedirect === 'function' ? wabGetPostAuthRedirect() : '/dashboard';
|
|
75
|
+
} catch (err) {
|
|
76
|
+
errorEl.textContent = 'Connection error. Please try again.';
|
|
77
|
+
errorEl.style.display = 'block';
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
</script>
|
|
81
|
+
<script src="/js/cookie-consent.js"></script>
|
|
82
|
+
</body>
|
|
83
|
+
</html>
|