@enigmax/dashboard 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/assets/index.html +28 -1
  2. package/package.json +1 -1
package/assets/index.html CHANGED
@@ -173,9 +173,13 @@
173
173
  </div>
174
174
 
175
175
  <div class="panel">
176
- <h2 style="margin-bottom:4px">Enigma Systems <small>what's active - configuration, not savings</small></h2>
176
+ <div class="panel-head">
177
+ <h2>Enigma Systems <small>what's active - configuration, not savings</small></h2>
178
+ <div class="ctrls"><button id="updateBtn" type="button" class="toggle on">Check &amp; update</button></div>
179
+ </div>
177
180
  <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
181
  <div id="systems" class="sys-grid"><div class="empty" style="padding:16px 0">Loading...</div></div>
182
+ <div id="updateNote" class="set-note"></div>
179
183
  </div>
180
184
 
181
185
  <div class="panel">
@@ -721,18 +725,40 @@
721
725
  const skillTags = '<span class="tag">' + (sk.enigma || 0) + " enigma</span>"
722
726
  + '<span class="tag ext">' + (sk.external || 0) + " external</span>"
723
727
  + ((sk.disabled || 0) ? '<span class="tag">' + sk.disabled + " disabled</span>" : "");
728
+ const sec = s.security || {};
729
+ const ps = s.proxyStats || {};
730
+ const proxyMeasured = (ps.calls || 0) > 0
731
+ ? item("Proxy measured · real", '<span class="tag">' + fmt(ps.calls) + " calls</span><span class=\"tag\">"
732
+ + fmt(ps.input) + " in</span><span class=\"tag\">" + fmt(ps.output) + " out</span><span class=\"tag\">" + fmt(ps.cacheRead) + " cache</span>")
733
+ : "";
734
+ const guard = (sec.guardProtects || []).map((p) => '<span class="tag">' + esc(p) + "</span>").join("");
724
735
  el.innerHTML =
725
736
  item("Context compression (MCP) · measured", boolPill(s.compress))
726
737
  + item("Real tool-usage stats · measured", boolPill(s.usageStats))
738
+ + item("Claude Code measuring proxy · experimental", boolPill(s.proxy))
739
+ + proxyMeasured
727
740
  + item("Token-efficient output", levelPill(s.outputStyle))
728
741
  + item("Minimal code", levelPill(s.minimalCode))
729
742
  + item("Parallel sub-agents", boolPill(s.parallelSubagents))
730
743
  + item("Auto-lint on edit", boolPill(s.autoLint))
731
744
  + item("Commit emoji", boolPill(s.commitEmoji))
732
745
  + item("Local dashboard", pill(s.dashboard === "off" ? "off" : "lvl", s.dashboard || "off"))
746
+ + item("Permission bypass (security)", boolPill(sec.permissionBypass))
747
+ + item("Commit guard blocks", guard || '<span class="tag">set up with enigma security</span>')
733
748
  + item("Skills", skillTags);
734
749
  }
735
750
 
751
+ async function runUpdate() {
752
+ $("updateNote").textContent = "Checking for updates...";
753
+ try {
754
+ const res = await fetch("/api/update", { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" });
755
+ const out = await res.json();
756
+ $("updateNote").textContent = out.ok ? (out.note || "Updated.") : ("Update failed: " + (out.error || "error"));
757
+ loadSystems();
758
+ if (skillsLoaded) loadSkills();
759
+ } catch { $("updateNote").textContent = "Could not reach the server to update."; }
760
+ }
761
+
736
762
  async function loadSystems() {
737
763
  try {
738
764
  const r = await fetch("/api/status", { cache: "no-store" });
@@ -854,6 +880,7 @@
854
880
  document.addEventListener("visibilitychange", () => { if (!document.hidden) poll(); });
855
881
  wireSettings();
856
882
  wireSkills();
883
+ $("updateBtn").addEventListener("click", runUpdate);
857
884
  window.addEventListener("hashchange", route);
858
885
  route();
859
886
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/dashboard",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
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": [