@enigmax/dashboard 0.1.48 → 0.1.50

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 +15 -5
  2. package/package.json +1 -1
package/assets/index.html CHANGED
@@ -247,6 +247,7 @@
247
247
  .achip { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); color: var(--muted); cursor: pointer; text-decoration: none; transition: color .15s, background .15s, border-color .15s; }
248
248
  .achip:hover { border-color: #2f3744; color: var(--text); }
249
249
  .achip.on { background: var(--good); color: #06210f; border-color: var(--good); }
250
+ .achip:disabled { opacity: .35; cursor: not-allowed; }
250
251
  .achip svg { width: 14px; height: 14px; display: block; }
251
252
  /* Inline app icons in the "where deployed" tag (static, name in tooltip). */
252
253
  .aicons { display: inline-flex; gap: 5px; align-items: center; vertical-align: middle; margin-left: 6px; }
@@ -2787,9 +2788,13 @@ export {
2787
2788
  // Project scope: same row, but the per-app chips toggle deployment INTO this project
2788
2789
  // (data-pskill, handled by the scope delegate) and the global-only controls are hidden.
2789
2790
  if (skillScope === "project") {
2790
- const chips = (s.agentStates || []).map((a) =>
2791
- '<button type="button" class="achip' + (a.deployed ? " on" : "") + '" data-pskill="' + esc(s.name) + '" data-pagent="' + esc(a.name) + '" data-poff="' + (a.deployed ? 1 : 0) + '" aria-label="' + esc(a.label) + '" title="'
2792
- + (a.deployed ? esc(a.label) + " - deployed, click to remove" : esc(a.label) + " - not deployed, click to deploy") + '">' + (agentSvg(a.name) || esc(a.label)) + "</button>").join("");
2791
+ const chips = (s.agentStates || []).map((a) => {
2792
+ // An app that is not installed on this machine can't be a deploy target - show
2793
+ // its chip disabled rather than letting a click create a dir for an unused agent.
2794
+ if (a.installed === false) return '<button type="button" class="achip" disabled aria-label="' + esc(a.label) + '" title="' + esc(a.label) + ' - not installed">' + (agentSvg(a.name) || esc(a.label)) + "</button>";
2795
+ return '<button type="button" class="achip' + (a.deployed ? " on" : "") + '" data-pskill="' + esc(s.name) + '" data-pagent="' + esc(a.name) + '" data-poff="' + (a.deployed ? 1 : 0) + '" aria-label="' + esc(a.label) + '" title="'
2796
+ + (a.deployed ? esc(a.label) + " - deployed, click to remove" : esc(a.label) + " - not deployed, click to deploy") + '">' + (agentSvg(a.name) || esc(a.label)) + "</button>";
2797
+ }).join("");
2793
2798
  return '<div class="set-row"><div class="set-meta"><div class="set-name">' + esc(s.name) + ver + "</div>"
2794
2799
  + '<div class="set-hint">' + esc(s.description || "") + "</div>"
2795
2800
  + '<div class="set-agents">' + (chips || '<span class="tag">no agents</span>') + "</div></div></div>";
@@ -2846,7 +2851,11 @@ export {
2846
2851
  + '<div class="set-cat-b">' + blurb + "</div>"
2847
2852
  + (list.length ? list.map(skillRow).join("") : '<div class="empty" style="padding:16px 0">' + emptyText + "</div>") + "</div>";
2848
2853
  if (skillScope === "project") {
2849
- $("skillsBody").innerHTML = section("Skills", "Deploy enigma's policy skills into this project, per app. A green chip means the skill is in that app's project folder.", skills, "No skills.");
2854
+ $("skillsBody").innerHTML =
2855
+ '<div class="panel"><div class="set-cat-h">Auto-detect skills by stack</div>'
2856
+ + '<div class="set-cat-b">Scan this project (packages, config files, gems) and install the matching community skills for its stack - hash-verified and kept separate from the policy skills below.</div>'
2857
+ + '<div class="ladd"><button type="button" class="toggle on with-icon" data-proj-autoskills><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>Detect &amp; install</button></div></div>'
2858
+ + section("Policy skills", "Deploy enigma's policy skills into this project, per app. A green chip means the skill is in that app's project folder.", skills, "No skills.");
2850
2859
  return;
2851
2860
  }
2852
2861
  const enigma = skills.filter((s) => s.source === "enigma");
@@ -3372,7 +3381,7 @@ export {
3372
3381
  const agents = d.agents || [];
3373
3382
  const skills = (d.available || []).map((s) => ({
3374
3383
  name: s.name, description: s.description, source: "enigma",
3375
- agentStates: agents.map((a) => ({ name: a.name, label: a.label, deployed: (a.deployed || []).indexOf(s.name) !== -1 })),
3384
+ agentStates: agents.map((a) => ({ name: a.name, label: a.label, installed: a.installed, deployed: (a.deployed || []).indexOf(s.name) !== -1 })),
3376
3385
  }));
3377
3386
  renderSkills(skills);
3378
3387
  }
@@ -3399,6 +3408,7 @@ export {
3399
3408
  }
3400
3409
  function onProjectControlClick(e) {
3401
3410
  if (!isProjectScope()) return;
3411
+ if (e.target.closest("[data-proj-autoskills]")) { projAction({ op: "autoskills" }, "Scan this project and install the matching community skills for its stack?"); return; }
3402
3412
  const chip = e.target.closest("[data-pskill]"); // per-app deploy chip in the Skills view
3403
3413
  if (chip) { projAction({ op: "skill", name: chip.dataset.pskill, agent: chip.dataset.pagent, on: chip.dataset.poff !== "1" }); return; }
3404
3414
  const sk = e.target.closest("[data-proj-skill]");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmax/dashboard",
3
- "version": "0.1.48",
3
+ "version": "0.1.50",
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": [