@barivia/barsom-mcp 0.23.12 → 0.23.13

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/dist/shared.js CHANGED
@@ -66,7 +66,7 @@ function newRequestId() {
66
66
  * X-Barsom-Client-Version so the server can annotate tool guidance with the
67
67
  * wrapper version each action requires. Keep in sync with package.json on bump.
68
68
  */
69
- export const CLIENT_VERSION = "0.23.12";
69
+ export const CLIENT_VERSION = "0.23.13";
70
70
  /** User-facing links; keep aligned with barivia.se / api.barivia.se. */
71
71
  export const PUBLIC_SITE_ORIGIN = "https://barivia.se";
72
72
  /** Self-serve account dashboard (manage plan, billing, and API keys). */
@@ -40,7 +40,7 @@ action=recolor: Change colormap or output format — no retraining. Returns a ne
40
40
  AFTER: use results(action=get, job_id=NEW_JOB_ID).
41
41
  Colormaps: viridis, plasma, inferno, magma, cividis, turbo, coolwarm, balance, hsv, twilight, RdBu, Spectral. Also: thermal, hot, grays, RdYlBu, delta, curl, phase, rainbow, tol_bright, tol_muted.
42
42
 
43
- action=feature_divergences: Recompute component-plane divergences (min-shift sum-normalized denormalized planes). Finalize already writes symmetric KL + rankings; use this for Wasserstein or a refresh. metrics default ["symmetric_kl","directed_kl"]; add "wasserstein" for W1. Auto-polls then summarizes top pairs vs Pearson top_correlations.
43
+ action=feature_divergences: Recompute component-plane divergences (min-shift sum-normalized denormalized planes). Finalize already writes directed KL heatmap (divergence_kl: cell (i,j)=KL(pᵢ‖pⱼ); upper/lower triangles opposite directions) plus SKL pair tops and mean-outgoing ranking in JSON; use this for Wasserstein or a refresh. metrics default ["symmetric_kl","directed_kl"]; add "wasserstein" for W1. Auto-polls then summarizes top pairs vs Pearson top_correlations.
44
44
 
45
45
  NOT FOR: Jobs that haven't completed (use jobs(action=status) first), or temporal flow (use inference(action=transition_flow)).`, {
46
46
  action: z
@@ -419,7 +419,7 @@ NOT FOR: Jobs that haven't completed (use jobs(action=status) first), or tempora
419
419
  ...(topCorrLine ? ["", topCorrLine] : []),
420
420
  ...(topDivLine ? [topDivLine] : []),
421
421
  ...(klComplexityLine ? [klComplexityLine] : []),
422
- ...(topDivLine || klComplexityLine ? ["(Compare Pearson vs KL: high |r| low KL; use results(action=feature_divergences, metrics=[\"wasserstein\"]) for W1.)"] : []),
422
+ ...(topDivLine || klComplexityLine ? ["(divergence_kl.png is directed KL: cell (i,j)=KL(pᵢ‖pⱼ), upper/lower triangles opposite directions. Compare Pearson vs SKL pair tops; use results(action=feature_divergences, metrics=[\"wasserstein\"]) for W1.)"] : []),
423
423
  ...(siom ? ["", "SIOM layer coverage (distinct from grid dead nodes):",
424
424
  ` Utilization: ${siom.utilization !== undefined ? Number(siom.utilization).toFixed(4) : "N/A"}`,
425
425
  ` SIOM dead fraction: ${siom.dead_fraction !== undefined ? Number(siom.dead_fraction).toFixed(4) : "N/A"}`,
@@ -732,19 +732,19 @@ NOT FOR: Jobs that haven't completed (use jobs(action=status) first), or tempora
732
732
  const topW1 = sum.top_wasserstein ?? null;
733
733
  const lines = [
734
734
  `Feature divergences complete — job_id: ${newJobId} (parent training: ${job_id})`,
735
- `Method: ${sum.divergence_method ?? "symmetric_kl_min_shift_sum_norm_denormalized_component_planes"}`,
735
+ `Method: ${sum.divergence_method ?? "kl_min_shift_sum_norm_denormalized_component_planes"}`,
736
736
  `Weight space: ${sum.weight_space ?? "denormalized"}`,
737
737
  `Metrics: ${JSON.stringify(sum.metrics ?? body.metrics)}`,
738
738
  topDivs.length
739
739
  ? `Top symmetric KL pairs: ${topDivs.map((t) => `${t.f1}&${t.f2}=${typeof t.symmetric_kl === "number" ? Number(t.symmetric_kl).toFixed(3) : t.symmetric_kl}`).join(", ")}`
740
740
  : "",
741
741
  klComp.length
742
- ? `KL complexity ranking: ${klComp.map((t) => `${t.feature}=${typeof t.mean_outgoing_kl === "number" ? Number(t.mean_outgoing_kl).toFixed(3) : t.mean_outgoing_kl}`).join(", ")}`
742
+ ? `KL complexity ranking (mean outgoing directed KL): ${klComp.map((t) => `${t.feature}=${typeof t.mean_outgoing_kl === "number" ? Number(t.mean_outgoing_kl).toFixed(3) : t.mean_outgoing_kl}`).join(", ")}`
743
743
  : "",
744
744
  topW1 && topW1.length
745
745
  ? `Top Wasserstein pairs: ${topW1.map((t) => `${t.f1}&${t.f2}=${typeof t.wasserstein === "number" ? Number(t.wasserstein).toFixed(3) : t.wasserstein}`).join(", ")}`
746
746
  : "",
747
- `Artifacts refreshed on parent result (divergence_kl / feature_divergences.json). Compare with Pearson top_correlations from results(get) on the training job.`,
747
+ `Artifacts refreshed on parent result (divergence_kl = directed KL heatmap, upper/lower triangles opposite directions; feature_divergences.json has both directed_kl and symmetric_kl). Compare with Pearson top_correlations from results(get) on the training job.`,
748
748
  ].filter(Boolean);
749
749
  const content = [{ type: "text", text: lines.join("\n") }];
750
750
  const files = sum.files ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barivia/barsom-mcp",
3
- "version": "0.23.12",
3
+ "version": "0.23.13",
4
4
  "description": "barSOM MCP proxy — connect any MCP client to the barSOM cloud API for Self-Organizing Map analytics",
5
5
  "keywords": [
6
6
  "mcp",