clawmagic 1.0.6 → 1.0.7
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/package.json +1 -1
- package/src/web/index.html +112 -26
package/package.json
CHANGED
package/src/web/index.html
CHANGED
|
@@ -398,36 +398,37 @@ a:hover { text-decoration: underline; }
|
|
|
398
398
|
<div class="step" id="step-5">
|
|
399
399
|
<div class="text-center">
|
|
400
400
|
<div class="success-check">✓</div>
|
|
401
|
-
<h1>You're all set!</h1>
|
|
402
|
-
<p class="subtitle">OpenClaw is production-ready.</p>
|
|
401
|
+
<h1 id="s-title">You're all set!</h1>
|
|
402
|
+
<p class="subtitle" id="s-subtitle">OpenClaw is production-ready.</p>
|
|
403
403
|
</div>
|
|
404
|
+
|
|
404
405
|
<div class="score-gauge">
|
|
405
406
|
<span class="old" id="s-before">0</span>
|
|
406
407
|
<span class="arrow">→</span>
|
|
407
408
|
<span class="new" id="s-after">0</span>
|
|
408
|
-
<span style="font-size:13px; color: var(--text-dim);">
|
|
409
|
+
<span style="font-size:13px; color: var(--text-dim);">configuration score</span>
|
|
409
410
|
</div>
|
|
411
|
+
|
|
410
412
|
<div class="stats-row" id="success-stats"></div>
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
<div
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
<div class="step-content"><p>Join our Discord: <a href="https://discord.gg/clawd" target="_blank">discord.gg/clawd</a></p></div>
|
|
427
|
-
</div>
|
|
413
|
+
|
|
414
|
+
<!-- Score breakdown -->
|
|
415
|
+
<div id="score-breakdown" style="max-width:480px; margin:24px auto 0; text-align:left;"></div>
|
|
416
|
+
|
|
417
|
+
<!-- What's included -->
|
|
418
|
+
<div id="install-includes" style="max-width:480px; margin:24px auto 0; padding:20px; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius);"></div>
|
|
419
|
+
|
|
420
|
+
<!-- Gateway status + dashboard -->
|
|
421
|
+
<div id="gateway-section" style="max-width:480px; margin:24px auto 0; text-align:center;">
|
|
422
|
+
<div id="gw-status" style="margin-bottom:16px;"></div>
|
|
423
|
+
<div id="gw-actions" style="display:flex; gap:12px; justify-content:center; flex-wrap:wrap;"></div>
|
|
424
|
+
</div>
|
|
425
|
+
|
|
426
|
+
<div style="max-width:480px; margin:20px auto 0; text-align:center;">
|
|
427
|
+
<p style="font-size:13px; color:var(--text-muted);">Need help? <a href="https://discord.gg/clawd" target="_blank" style="color:var(--accent);">discord.gg/clawd</a></p>
|
|
428
428
|
</div>
|
|
429
|
+
|
|
429
430
|
<div class="text-center mt-24">
|
|
430
|
-
<button class="btn btn-primary btn-big" onclick="shutdown()">Close</button>
|
|
431
|
+
<button class="btn btn-primary btn-big" onclick="shutdown()">Close ClawMagic</button>
|
|
431
432
|
</div>
|
|
432
433
|
</div>
|
|
433
434
|
|
|
@@ -703,19 +704,79 @@ async function runConfigure() {
|
|
|
703
704
|
await sleep(600);
|
|
704
705
|
|
|
705
706
|
// Populate success page
|
|
706
|
-
|
|
707
|
-
|
|
707
|
+
const r = state.report;
|
|
708
|
+
const flavorName = r.flavorName || 'Standard';
|
|
709
|
+
|
|
710
|
+
document.getElementById('s-title').textContent = `${flavorName} Configuration Installed`;
|
|
711
|
+
document.getElementById('s-subtitle').textContent = r.gatewayStarted
|
|
712
|
+
? 'Your agent is running and ready to chat.'
|
|
713
|
+
: 'Configuration complete. Start your gateway to begin.';
|
|
714
|
+
|
|
715
|
+
document.getElementById('s-before').textContent = (r.beforeScore || 0) + '/100';
|
|
716
|
+
document.getElementById('s-after').textContent = (r.afterScore || 0) + '/100';
|
|
708
717
|
|
|
709
718
|
const validProviders = apiKeys.length;
|
|
710
|
-
const skillsActivated =
|
|
711
|
-
const filesCreated = (
|
|
719
|
+
const skillsActivated = r.skillsActivated || 0;
|
|
720
|
+
const filesCreated = (r.filesCreated || []).length;
|
|
721
|
+
const cronJobs = r.cronJobs || 0;
|
|
712
722
|
|
|
713
723
|
document.getElementById('success-stats').innerHTML = `
|
|
714
724
|
<div class="stat-card"><div class="val">${validProviders}</div><div class="label">Providers</div></div>
|
|
715
725
|
<div class="stat-card"><div class="val">${skillsActivated}</div><div class="label">Skills</div></div>
|
|
716
|
-
<div class="stat-card"><div class="val">${filesCreated}</div><div class="label">Files
|
|
726
|
+
<div class="stat-card"><div class="val">${filesCreated}</div><div class="label">Files</div></div>
|
|
727
|
+
<div class="stat-card"><div class="val">${cronJobs}</div><div class="label">Auto Tasks</div></div>
|
|
717
728
|
`;
|
|
718
729
|
|
|
730
|
+
// Score breakdown
|
|
731
|
+
const scoreItems = r.scoreItems || [];
|
|
732
|
+
if (scoreItems.length > 0) {
|
|
733
|
+
const bd = document.getElementById('score-breakdown');
|
|
734
|
+
bd.innerHTML = '<h3 style="font-size:14px; color:var(--text-dim); margin-bottom:12px; text-transform:uppercase; letter-spacing:0.05em;">Configuration Report</h3>' +
|
|
735
|
+
scoreItems.map(item => {
|
|
736
|
+
const icon = item.status === 'pass' ? '✅' : item.status === 'partial' ? '🟡' : '❌';
|
|
737
|
+
return `<div style="display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--border);">
|
|
738
|
+
<span>${icon}</span>
|
|
739
|
+
<span style="flex:1; font-size:14px;">${item.name}</span>
|
|
740
|
+
<span style="font-size:13px; color:var(--text-dim);">${item.points}/${item.maxPoints}</span>
|
|
741
|
+
</div>` + (item.detail ? `<div style="padding:2px 0 6px 30px; font-size:12px; color:var(--text-muted);">${item.detail}</div>` : '');
|
|
742
|
+
}).join('');
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// What's included
|
|
746
|
+
const inc = document.getElementById('install-includes');
|
|
747
|
+
inc.innerHTML = `
|
|
748
|
+
<h3 style="font-size:14px; color:var(--accent); margin-bottom:12px;">Your ${flavorName} Install Includes</h3>
|
|
749
|
+
<div style="font-size:14px; line-height:1.8; color:var(--text);">
|
|
750
|
+
✦ ${skillsActivated} skills active<br>
|
|
751
|
+
✦ ${cronJobs} automated tasks (including onboarding interview)<br>
|
|
752
|
+
✦ Three-tier memory system<br>
|
|
753
|
+
✦ Heartbeat monitoring (every 30 min)<br>
|
|
754
|
+
✦ ${validProviders} AI provider${validProviders !== 1 ? 's' : ''} configured<br>
|
|
755
|
+
✦ Security-hardened file permissions
|
|
756
|
+
</div>
|
|
757
|
+
`;
|
|
758
|
+
|
|
759
|
+
// Gateway section
|
|
760
|
+
const gwStatus = document.getElementById('gw-status');
|
|
761
|
+
const gwActions = document.getElementById('gw-actions');
|
|
762
|
+
if (r.gatewayStarted && r.dashboardUrl) {
|
|
763
|
+
gwStatus.innerHTML = '<p style="color:var(--green); font-size:15px; font-weight:600;">✅ Gateway running</p>';
|
|
764
|
+
gwActions.innerHTML = `
|
|
765
|
+
<button class="btn btn-primary btn-big" onclick="window.open('${r.dashboardUrl}', '_blank')" style="font-size:16px;">
|
|
766
|
+
🚀 Open Dashboard — Say Hello
|
|
767
|
+
</button>
|
|
768
|
+
`;
|
|
769
|
+
} else if (r.gatewayStarted) {
|
|
770
|
+
gwStatus.innerHTML = '<p style="color:var(--green); font-size:14px;">✅ Gateway running</p>';
|
|
771
|
+
gwActions.innerHTML = '<p style="font-size:13px; color:var(--text-dim);">Open your terminal and run: <code style="color:var(--accent);">openclaw</code></p>';
|
|
772
|
+
} else {
|
|
773
|
+
gwStatus.innerHTML = '<p style="color:var(--yellow); font-size:14px;">⚠️ Gateway not started</p>';
|
|
774
|
+
gwActions.innerHTML = `
|
|
775
|
+
<button class="btn btn-primary" id="btn-restart-gw" onclick="restartGateway()">Start Gateway</button>
|
|
776
|
+
<p style="font-size:12px; color:var(--text-muted); width:100%; margin-top:8px;">Or run: <code style="color:var(--accent);">openclaw gateway start</code></p>
|
|
777
|
+
`;
|
|
778
|
+
}
|
|
779
|
+
|
|
719
780
|
goTo(5);
|
|
720
781
|
} catch (err) {
|
|
721
782
|
btn.disabled = false;
|
|
@@ -734,6 +795,31 @@ function copyText(text) {
|
|
|
734
795
|
}).catch(() => {});
|
|
735
796
|
}
|
|
736
797
|
|
|
798
|
+
async function restartGateway() {
|
|
799
|
+
const btn = document.getElementById('btn-restart-gw');
|
|
800
|
+
if (btn) { btn.disabled = true; btn.textContent = 'Starting...'; }
|
|
801
|
+
try {
|
|
802
|
+
const res = await fetch(API + '/api/restart-gateway', { method: 'POST' });
|
|
803
|
+
const data = await res.json();
|
|
804
|
+
const gwStatus = document.getElementById('gw-status');
|
|
805
|
+
const gwActions = document.getElementById('gw-actions');
|
|
806
|
+
if (data.success && data.dashboardUrl) {
|
|
807
|
+
gwStatus.innerHTML = '<p style="color:var(--green); font-size:15px; font-weight:600;">✅ Gateway running</p>';
|
|
808
|
+
gwActions.innerHTML = `
|
|
809
|
+
<button class="btn btn-primary btn-big" onclick="window.open('${data.dashboardUrl}', '_blank')" style="font-size:16px;">
|
|
810
|
+
🚀 Open Dashboard — Say Hello
|
|
811
|
+
</button>
|
|
812
|
+
`;
|
|
813
|
+
} else {
|
|
814
|
+
gwStatus.innerHTML = '<p style="color:var(--red); font-size:14px;">❌ Could not start gateway</p>';
|
|
815
|
+
gwActions.innerHTML = `<p style="font-size:13px; color:var(--text-dim);">Run manually: <code style="color:var(--accent);">openclaw gateway start</code></p>`;
|
|
816
|
+
}
|
|
817
|
+
} catch (err) {
|
|
818
|
+
const gwStatus = document.getElementById('gw-status');
|
|
819
|
+
if (gwStatus) gwStatus.innerHTML = '<p style="color:var(--red); font-size:14px;">❌ Error: ' + (err.message || 'Unknown') + '</p>';
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
737
823
|
async function shutdown() {
|
|
738
824
|
try { await fetch(API + '/api/shutdown', { method: 'POST' }); } catch {}
|
|
739
825
|
document.body.innerHTML = '<div style="display:flex;align-items:center;justify-content:center;height:100vh;color:#888;font-family:sans-serif;"><p>ClawMagic closed. You can close this tab.</p></div>';
|