web-agent-bridge 1.1.1 → 1.1.2
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 +844 -844
- package/bin/cli.js +80 -80
- package/bin/wab.js +80 -80
- package/docs/DEPLOY.md +118 -118
- package/docs/SPEC.md +1540 -1540
- package/examples/bidi-agent.js +119 -119
- package/examples/mcp-agent.js +94 -94
- package/examples/puppeteer-agent.js +108 -108
- package/examples/vision-agent.js +171 -171
- package/package.json +78 -78
- package/public/admin/dashboard.html +848 -848
- package/public/admin/login.html +84 -84
- package/public/cookies.html +208 -208
- package/public/css/styles.css +1235 -1235
- package/public/dashboard.html +704 -704
- package/public/docs.html +585 -585
- package/public/index.html +332 -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/ws-client.js +74 -74
- package/public/login.html +83 -83
- package/public/privacy.html +295 -295
- package/public/register.html +103 -103
- package/public/terms.html +254 -254
- package/script/ai-agent-bridge.js +1513 -1513
- package/sdk/README.md +55 -55
- package/sdk/index.js +203 -203
- package/sdk/package.json +14 -14
- package/server/config/secrets.js +92 -92
- package/server/index.js +181 -181
- 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/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.js +247 -247
- package/server/routes/api.js +138 -138
- package/server/routes/auth.js +51 -51
- package/server/routes/billing.js +45 -45
- package/server/routes/discovery.js +329 -329
- package/server/routes/license.js +240 -240
- package/server/routes/noscript.js +543 -543
- package/server/routes/wab-api.js +476 -476
- package/server/services/email.js +204 -204
- package/server/services/fairness.js +420 -420
- package/server/services/stripe.js +192 -192
- 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/wab-mcp-adapter/README.md +136 -136
- package/wab-mcp-adapter/index.js +555 -555
- package/wab-mcp-adapter/package.json +17 -17
- package/public/css/premium.css +0 -317
- package/public/premium-dashboard.html +0 -2075
- package/public/premium.html +0 -791
- package/server/migrations/002_premium_features.sql +0 -418
- package/server/routes/premium.js +0 -724
- package/server/services/premium.js +0 -1680
package/public/register.html
CHANGED
|
@@ -1,103 +1,103 @@
|
|
|
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>Create Account — 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;">Create account</h1>
|
|
23
|
-
<p class="subtitle" style="text-align:center;">Get started with Web Agent Bridge</p>
|
|
24
|
-
|
|
25
|
-
<div class="alert alert-error" id="errorAlert"></div>
|
|
26
|
-
<div class="alert alert-success" id="successAlert"></div>
|
|
27
|
-
|
|
28
|
-
<form id="registerForm">
|
|
29
|
-
<div class="form-group">
|
|
30
|
-
<label for="name">Full Name</label>
|
|
31
|
-
<input type="text" id="name" class="form-input" placeholder="John Doe" required>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="form-group">
|
|
34
|
-
<label for="email">Email</label>
|
|
35
|
-
<input type="email" id="email" class="form-input" placeholder="you@example.com" required>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="form-group">
|
|
38
|
-
<label for="company">Company <span style="color:var(--text-muted);">(optional)</span></label>
|
|
39
|
-
<input type="text" id="company" class="form-input" placeholder="Your company">
|
|
40
|
-
</div>
|
|
41
|
-
<div class="form-group">
|
|
42
|
-
<label for="password">Password</label>
|
|
43
|
-
<input type="password" id="password" class="form-input" placeholder="Min 8 characters" required minlength="8">
|
|
44
|
-
</div>
|
|
45
|
-
<div class="form-group" style="display: flex; align-items: flex-start; gap: 8px;">
|
|
46
|
-
<input type="checkbox" id="termsConsent" required style="margin-top: 4px; accent-color: var(--accent-blue);">
|
|
47
|
-
<label for="termsConsent" style="font-size: 0.85rem; color: var(--text-muted); line-height: 1.5;">
|
|
48
|
-
I agree to the <a href="/terms" style="color: var(--accent-blue);">Terms of Service</a> and
|
|
49
|
-
<a href="/privacy" style="color: var(--accent-blue);">Privacy Policy</a>
|
|
50
|
-
</label>
|
|
51
|
-
</div>
|
|
52
|
-
<button type="submit" class="btn btn-primary btn-lg">Create Account</button>
|
|
53
|
-
</form>
|
|
54
|
-
|
|
55
|
-
<div class="auth-footer">
|
|
56
|
-
Already have an account? <a href="/login">Sign in</a>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<script>
|
|
62
|
-
if (localStorage.getItem('wab_token')) {
|
|
63
|
-
window.location.replace(typeof wabGetPostAuthRedirect === 'function' ? wabGetPostAuthRedirect() : '/dashboard');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
document.getElementById('registerForm').addEventListener('submit', async (e) => {
|
|
67
|
-
e.preventDefault();
|
|
68
|
-
const errorEl = document.getElementById('errorAlert');
|
|
69
|
-
const successEl = document.getElementById('successAlert');
|
|
70
|
-
errorEl.style.display = 'none';
|
|
71
|
-
successEl.style.display = 'none';
|
|
72
|
-
|
|
73
|
-
const name = document.getElementById('name').value;
|
|
74
|
-
const email = document.getElementById('email').value;
|
|
75
|
-
const company = document.getElementById('company').value;
|
|
76
|
-
const password = document.getElementById('password').value;
|
|
77
|
-
|
|
78
|
-
try {
|
|
79
|
-
const res = await fetch('/api/auth/register', {
|
|
80
|
-
method: 'POST',
|
|
81
|
-
headers: { 'Content-Type': 'application/json' },
|
|
82
|
-
body: JSON.stringify({ name, email, company, password })
|
|
83
|
-
});
|
|
84
|
-
const data = await res.json();
|
|
85
|
-
|
|
86
|
-
if (!res.ok) {
|
|
87
|
-
errorEl.textContent = data.error || 'Registration failed';
|
|
88
|
-
errorEl.style.display = 'block';
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
localStorage.setItem('wab_token', data.token);
|
|
93
|
-
localStorage.setItem('wab_user', JSON.stringify(data.user));
|
|
94
|
-
window.location.href = typeof wabGetPostAuthRedirect === 'function' ? wabGetPostAuthRedirect() : '/dashboard';
|
|
95
|
-
} catch (err) {
|
|
96
|
-
errorEl.textContent = 'Connection error. Please try again.';
|
|
97
|
-
errorEl.style.display = 'block';
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
</script>
|
|
101
|
-
<script src="/js/cookie-consent.js"></script>
|
|
102
|
-
</body>
|
|
103
|
-
</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>Create Account — 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;">Create account</h1>
|
|
23
|
+
<p class="subtitle" style="text-align:center;">Get started with Web Agent Bridge</p>
|
|
24
|
+
|
|
25
|
+
<div class="alert alert-error" id="errorAlert"></div>
|
|
26
|
+
<div class="alert alert-success" id="successAlert"></div>
|
|
27
|
+
|
|
28
|
+
<form id="registerForm">
|
|
29
|
+
<div class="form-group">
|
|
30
|
+
<label for="name">Full Name</label>
|
|
31
|
+
<input type="text" id="name" class="form-input" placeholder="John Doe" required>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="form-group">
|
|
34
|
+
<label for="email">Email</label>
|
|
35
|
+
<input type="email" id="email" class="form-input" placeholder="you@example.com" required>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="form-group">
|
|
38
|
+
<label for="company">Company <span style="color:var(--text-muted);">(optional)</span></label>
|
|
39
|
+
<input type="text" id="company" class="form-input" placeholder="Your company">
|
|
40
|
+
</div>
|
|
41
|
+
<div class="form-group">
|
|
42
|
+
<label for="password">Password</label>
|
|
43
|
+
<input type="password" id="password" class="form-input" placeholder="Min 8 characters" required minlength="8">
|
|
44
|
+
</div>
|
|
45
|
+
<div class="form-group" style="display: flex; align-items: flex-start; gap: 8px;">
|
|
46
|
+
<input type="checkbox" id="termsConsent" required style="margin-top: 4px; accent-color: var(--accent-blue);">
|
|
47
|
+
<label for="termsConsent" style="font-size: 0.85rem; color: var(--text-muted); line-height: 1.5;">
|
|
48
|
+
I agree to the <a href="/terms" style="color: var(--accent-blue);">Terms of Service</a> and
|
|
49
|
+
<a href="/privacy" style="color: var(--accent-blue);">Privacy Policy</a>
|
|
50
|
+
</label>
|
|
51
|
+
</div>
|
|
52
|
+
<button type="submit" class="btn btn-primary btn-lg">Create Account</button>
|
|
53
|
+
</form>
|
|
54
|
+
|
|
55
|
+
<div class="auth-footer">
|
|
56
|
+
Already have an account? <a href="/login">Sign in</a>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<script>
|
|
62
|
+
if (localStorage.getItem('wab_token')) {
|
|
63
|
+
window.location.replace(typeof wabGetPostAuthRedirect === 'function' ? wabGetPostAuthRedirect() : '/dashboard');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
document.getElementById('registerForm').addEventListener('submit', async (e) => {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
const errorEl = document.getElementById('errorAlert');
|
|
69
|
+
const successEl = document.getElementById('successAlert');
|
|
70
|
+
errorEl.style.display = 'none';
|
|
71
|
+
successEl.style.display = 'none';
|
|
72
|
+
|
|
73
|
+
const name = document.getElementById('name').value;
|
|
74
|
+
const email = document.getElementById('email').value;
|
|
75
|
+
const company = document.getElementById('company').value;
|
|
76
|
+
const password = document.getElementById('password').value;
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
const res = await fetch('/api/auth/register', {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
headers: { 'Content-Type': 'application/json' },
|
|
82
|
+
body: JSON.stringify({ name, email, company, password })
|
|
83
|
+
});
|
|
84
|
+
const data = await res.json();
|
|
85
|
+
|
|
86
|
+
if (!res.ok) {
|
|
87
|
+
errorEl.textContent = data.error || 'Registration failed';
|
|
88
|
+
errorEl.style.display = 'block';
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
localStorage.setItem('wab_token', data.token);
|
|
93
|
+
localStorage.setItem('wab_user', JSON.stringify(data.user));
|
|
94
|
+
window.location.href = typeof wabGetPostAuthRedirect === 'function' ? wabGetPostAuthRedirect() : '/dashboard';
|
|
95
|
+
} catch (err) {
|
|
96
|
+
errorEl.textContent = 'Connection error. Please try again.';
|
|
97
|
+
errorEl.style.display = 'block';
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
</script>
|
|
101
|
+
<script src="/js/cookie-consent.js"></script>
|
|
102
|
+
</body>
|
|
103
|
+
</html>
|