@enigmax/dashboard 0.1.11 → 0.1.12

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 +25 -1
  2. package/package.json +1 -1
package/assets/index.html CHANGED
@@ -205,6 +205,7 @@
205
205
  <h2>Enigma Systems <small>what's active - configuration, not savings</small></h2>
206
206
  <div class="ctrls">
207
207
  <button id="refreshBtn" type="button" class="toggle">Refresh</button>
208
+ <button id="fixPathBtn" type="button" class="toggle">Fix tool paths</button>
208
209
  <button id="updateBtn" type="button" class="toggle on">Check &amp; update</button>
209
210
  </div>
210
211
  </div>
@@ -1009,7 +1010,17 @@
1009
1010
  + item("Local dashboard", pill(s.dashboard === "off" ? "off" : "lvl", s.dashboard || "off"))
1010
1011
  + item("Permission bypass (security)", boolPill(sec.permissionBypass))
1011
1012
  + item("Commit guard blocks", guard || '<span class="tag">set up with enigma security</span>')
1012
- + item("Skills", skillTags);
1013
+ + item("Skills", skillTags)
1014
+ + item("Tool launch paths", toolPathTags(s.tools));
1015
+ }
1016
+
1017
+ // Per-tool launch-path status: green when launchable, yellow when off PATH, red when missing.
1018
+ function toolPathTags(tools) {
1019
+ if (!tools || !tools.length) return '<span class="tag">unknown</span>';
1020
+ return tools.map((t) => {
1021
+ const cls = t.status === "not installed" ? "warn" : (t.status === "installed, off PATH" ? "ext" : "");
1022
+ return '<span class="tag ' + cls + '">' + esc(t.label) + ": " + esc(t.status) + "</span>";
1023
+ }).join("");
1013
1024
  }
1014
1025
 
1015
1026
  async function runUpdate() {
@@ -1025,6 +1036,18 @@
1025
1036
  } catch { $("updateNote").textContent = "Could not reach the server to update."; }
1026
1037
  }
1027
1038
 
1039
+ // Detect & repair every tool's launch path; the server persists any off-PATH
1040
+ // binary so `enigma <tool>` works, and returns the refreshed status.
1041
+ async function runFixPath() {
1042
+ $("updateNote").textContent = "Detecting tool paths...";
1043
+ try {
1044
+ const res = await fetch("/api/fix-path", { method: "POST", headers: { "Content-Type": "application/json" }, body: "{}" });
1045
+ const out = await res.json();
1046
+ $("updateNote").textContent = (out.lines || []).join(" ") || (out.ok ? "Tool paths OK." : "Could not fix all tools.");
1047
+ loadSystems(true);
1048
+ } catch { $("updateNote").textContent = "Could not reach the server to fix tool paths."; }
1049
+ }
1050
+
1028
1051
  async function loadSystems(force) {
1029
1052
  if (!live && !force) return;
1030
1053
  try {
@@ -1283,6 +1306,7 @@
1283
1306
  $("cfgExport").addEventListener("click", exportConfig);
1284
1307
  $("cfgImport").addEventListener("click", importConfig);
1285
1308
  $("updateBtn").addEventListener("click", runUpdate);
1309
+ $("fixPathBtn").addEventListener("click", runFixPath);
1286
1310
  $("refreshBtn").addEventListener("click", () => refreshAll(true));
1287
1311
  window.addEventListener("hashchange", route);
1288
1312
  route();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/dashboard",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
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": [