@enigmax/dashboard 0.1.2 → 0.1.3
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/assets/index.html +46 -1
- package/package.json +1 -1
package/assets/index.html
CHANGED
|
@@ -124,6 +124,13 @@
|
|
|
124
124
|
border-radius: 7px; padding: 5px 14px; font-size: 12px; cursor: pointer; font-family: inherit;
|
|
125
125
|
}
|
|
126
126
|
.btn-danger:hover { border-color: var(--accent2); }
|
|
127
|
+
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; }
|
|
128
|
+
.sys-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--surface2); font-size: 13px; }
|
|
129
|
+
.sys-item .k { color: var(--muted); }
|
|
130
|
+
.pill { font-size: 11px; border-radius: 6px; padding: 2px 9px; border: 1px solid var(--border); white-space: nowrap; }
|
|
131
|
+
.pill.on { color: #06210f; background: var(--good); border-color: var(--good); font-weight: 600; }
|
|
132
|
+
.pill.off { color: var(--muted); background: var(--surface2); }
|
|
133
|
+
.pill.lvl { color: #1a1206; background: var(--accent); border-color: var(--accent); font-weight: 600; }
|
|
127
134
|
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } header { gap: 12px; } }
|
|
128
135
|
</style>
|
|
129
136
|
</head>
|
|
@@ -165,6 +172,12 @@
|
|
|
165
172
|
<div class="card"><div class="label">Best Compression</div><div id="best" class="value">-</div><div class="foot">Most saved in one call</div></div>
|
|
166
173
|
</div>
|
|
167
174
|
|
|
175
|
+
<div class="panel">
|
|
176
|
+
<h2 style="margin-bottom:4px">Enigma Systems <small>what's active - configuration, not savings</small></h2>
|
|
177
|
+
<div class="sub" style="margin-bottom:14px">Only Context Compression and (opt-in) real tool-usage are measured for savings below. The rest is shown as state: enigma can't measure their effect because they run inside the agent, not through enigma - so it reports their configuration honestly instead of inventing a number.</div>
|
|
178
|
+
<div id="systems" class="sys-grid"><div class="empty" style="padding:16px 0">Loading...</div></div>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
168
181
|
<div class="panel">
|
|
169
182
|
<div class="panel-head">
|
|
170
183
|
<h2>Savings Per Day <small id="rangeLabel"></small></h2>
|
|
@@ -695,6 +708,38 @@
|
|
|
695
708
|
} catch { $("settingsBody").innerHTML = '<div class="empty" style="padding:24px 0">Settings unavailable.</div>'; }
|
|
696
709
|
}
|
|
697
710
|
|
|
711
|
+
// --- "Enigma systems" overview (factual state, never invented savings) ---
|
|
712
|
+
function pill(state, text) { return '<span class="pill ' + state + '">' + esc(text) + "</span>"; }
|
|
713
|
+
function boolPill(b) { return b ? pill("on", "on") : pill("off", "off"); }
|
|
714
|
+
function levelPill(v) { return (!v || v === "off") ? pill("off", "off") : pill("lvl", v); }
|
|
715
|
+
|
|
716
|
+
function renderSystems(s) {
|
|
717
|
+
const el = $("systems");
|
|
718
|
+
if (!s) { el.innerHTML = '<div class="empty" style="padding:16px 0">Status unavailable.</div>'; return; }
|
|
719
|
+
const item = (k, v) => '<div class="sys-item"><span class="k">' + k + '</span><span class="v">' + v + "</span></div>";
|
|
720
|
+
const sk = s.skills || {};
|
|
721
|
+
const skillTags = '<span class="tag">' + (sk.enigma || 0) + " enigma</span>"
|
|
722
|
+
+ '<span class="tag ext">' + (sk.external || 0) + " external</span>"
|
|
723
|
+
+ ((sk.disabled || 0) ? '<span class="tag">' + sk.disabled + " disabled</span>" : "");
|
|
724
|
+
el.innerHTML =
|
|
725
|
+
item("Context compression (MCP) · measured", boolPill(s.compress))
|
|
726
|
+
+ item("Real tool-usage stats · measured", boolPill(s.usageStats))
|
|
727
|
+
+ item("Token-efficient output", levelPill(s.outputStyle))
|
|
728
|
+
+ item("Minimal code", levelPill(s.minimalCode))
|
|
729
|
+
+ item("Parallel sub-agents", boolPill(s.parallelSubagents))
|
|
730
|
+
+ item("Auto-lint on edit", boolPill(s.autoLint))
|
|
731
|
+
+ item("Commit emoji", boolPill(s.commitEmoji))
|
|
732
|
+
+ item("Local dashboard", pill(s.dashboard === "off" ? "off" : "lvl", s.dashboard || "off"))
|
|
733
|
+
+ item("Skills", skillTags);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
async function loadSystems() {
|
|
737
|
+
try {
|
|
738
|
+
const r = await fetch("/api/status", { cache: "no-store" });
|
|
739
|
+
renderSystems((await r.json()).systems);
|
|
740
|
+
} catch { $("systems").innerHTML = '<div class="empty" style="padding:16px 0">Status unavailable.</div>'; }
|
|
741
|
+
}
|
|
742
|
+
|
|
698
743
|
// --- skills subpage (lists enigma + external skills over /api/skills) ---
|
|
699
744
|
function skillRow(s) {
|
|
700
745
|
const ver = s.version ? '<span class="tag">v' + esc(s.version) + "</span>" : "";
|
|
@@ -800,7 +845,7 @@
|
|
|
800
845
|
if (v === "settings" && !settingsLoaded) { settingsLoaded = true; loadSettings(); }
|
|
801
846
|
if (v === "skills" && !skillsLoaded) { skillsLoaded = true; loadSkills(); }
|
|
802
847
|
// The chart was sized while its view may have been hidden; nudge it on return.
|
|
803
|
-
if (v === "savings"
|
|
848
|
+
if (v === "savings") { loadSystems(); if (chart) { try { applyRange(); } catch { /* not ready */ } } }
|
|
804
849
|
}
|
|
805
850
|
|
|
806
851
|
initChart();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmax/dashboard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Local browser dashboard UI for enigma: the static page and chart assets enigma serves on its loopback dashboard (savings, real tool usage, in-browser settings). Installed on demand by enigma-cli; not a runtime dependency.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|