misakanet 3.12.2 → 3.14.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "misakanet",
3
- "version": "3.12.2",
3
+ "version": "3.14.0",
4
4
  "description": "Failure-memory network for AI coding agents: search evidence-rated failure lessons, submit new failures, and turn crashes into reusable knowledge.",
5
5
  "author": {
6
6
  "name": "Ikalus1988",
package/lib/client.js CHANGED
@@ -132,6 +132,9 @@ window.__ModuleLoader__.load({
132
132
  var en = {
133
133
  "guide.description": "What this session asked, what came back, and what you filed",
134
134
  "panel.asked": "What this session asked",
135
+ "panel.recent": "Recent in this browser",
136
+ "panel.recent.hit": "hit",
137
+ "panel.recent.miss": "no match",
135
138
  "panel.asked.none": "Nothing searched yet. In the composer: `/misakanet <what broke>`.",
136
139
  "panel.reports": "Reports you filed",
137
140
  "panel.reports.none": "Nothing filed from this session.",
@@ -141,15 +144,19 @@ window.__ModuleLoader__.load({
141
144
  "panel.hint.openLabel": "Open the search box",
142
145
  "panel.hint.openTitle": "Opens the composer's own MisakaNet overlay, which carries the same instruction. It does not type into the composer: a view occupant receives props, and the draft is reachable only from a live session scope, so nothing here can put `/misakanet ` in the box for you.",
143
146
  "panel.activity": "Your activity",
147
+ "panel.flash.hit": "hit +1",
148
+ "panel.flash.search": "search +1",
149
+ "panel.flash.contrib": "contribution +0.5",
144
150
  "panel.ladder": "Contribution ladder",
145
151
  "panel.ladder.window": "this week · top 5",
152
+ "panel.network": "Network & corpus",
146
153
  "panel.sources": "Where these numbers come from",
147
154
  "panel.ladder.loading": "reading this week\u2019s ladder\u2026",
148
155
  "panel.ladder.none": "No contribution recorded this week yet.",
149
156
  "panel.ladder.coverage": "Submissions only; retrieval attribution pending.",
150
157
  "panel.voice": "Voice",
151
- "panel.voice.on": "Voice cues: on",
152
- "panel.voice.off": "Voice cues: off",
158
+ "panel.voice.on": "on",
159
+ "panel.voice.off": "off",
153
160
  "overlay.searching": "Searching…",
154
161
  "overlay.empty": "After /misakanet, type what broke, e.g. /misakanet pip install timeout",
155
162
  "overlay.none": "No lesson covers this yet. Ask the agent to file it (misakanet_submit_intake), or file it at misakanet.org — that is how the next person finds it here.",
@@ -311,6 +318,9 @@ window.__ModuleLoader__.load({
311
318
  var zh = {
312
319
  "guide.description": "本会话问过什么、拿回了什么、你报了什么",
313
320
  "panel.asked": "本会话问过什么",
321
+ "panel.recent": "本浏览器最近",
322
+ "panel.recent.hit": "命中",
323
+ "panel.recent.miss": "未命中",
314
324
  "panel.asked.none": "还没有检索过。在输入框里写 `/misakanet <出了什么问题>`。",
315
325
  "panel.reports": "你报过的问题",
316
326
  "panel.reports.none": "本会话没有报过任何问题。",
@@ -320,15 +330,19 @@ window.__ModuleLoader__.load({
320
330
  "panel.hint.openLabel": "打开检索框",
321
331
  "panel.hint.openTitle": "打开输入框自己的 MisakaNet 浮层,里面写着同样的用法。它不会替你在输入框里打字:视图组件只拿得到 props,草稿只有活的 session 作用域才能改,所以从这里没办法替你填入「/misakanet 」。",
322
332
  "panel.activity": "你的活动",
333
+ "panel.flash.hit": "命中 +1",
334
+ "panel.flash.search": "检索 +1",
335
+ "panel.flash.contrib": "贡献 +0.5",
323
336
  "panel.ladder": "贡献天梯",
324
337
  "panel.ladder.window": "本周 · 前五",
338
+ "panel.network": "网络与语料",
325
339
  "panel.sources": "这些数字从哪来",
326
340
  "panel.ladder.loading": "正在读本周天梯…",
327
341
  "panel.ladder.none": "本周还没有可上榜的贡献。",
328
342
  "panel.ladder.coverage": "仅计提交;取用归属未接入。",
329
343
  "panel.voice": "语音",
330
- "panel.voice.on": "语音提示:开",
331
- "panel.voice.off": "语音提示:关",
344
+ "panel.voice.on": "开",
345
+ "panel.voice.off": "关",
332
346
  "overlay.searching": "检索中……",
333
347
  "overlay.empty": "在 /misakanet 后面写清楚出了什么问题,例如 /misakanet pip install 超时。",
334
348
  "overlay.none": "还没有课程覆盖这个问题。可以让 agent 报料(misakanet_submit_intake),或直接去 misakanet.org 提交 —— 下一个人就能在这里搜到它。",
@@ -624,6 +638,38 @@ window.__ModuleLoader__.load({
624
638
  return { searches: 0, lessonsReused: 0, votes: 0, reportsFiled: 0, reportsConverted: 0 };
625
639
  }
626
640
 
641
+ /**
642
+ * The last few searches this browser made, kept across sessions.
643
+ *
644
+ * The counters above already survive a reload; the *rows* did not, because the panel rebuilds
645
+ * them from the session transcript and a closed session has none. That is why a reopened window
646
+ * showed zeros for a browser that had searched an hour earlier. This store holds only what the
647
+ * person typed and whether it found a lesson — no lesson body, no tool arguments — capped at 20,
648
+ * local only, same rule as every counter here.
649
+ */
650
+ var HISTORY_KEY = "misakanet.panel.history.v1";
651
+ var HISTORY_MAX = 20;
652
+
653
+ function readHistory() {
654
+ try {
655
+ var raw = window.localStorage.getItem(HISTORY_KEY);
656
+ var list = raw ? JSON.parse(raw) : [];
657
+ return Array.isArray(list) ? list : [];
658
+ } catch (error) {
659
+ return [];
660
+ }
661
+ }
662
+
663
+ function pushHistory(entry) {
664
+ try {
665
+ var list = readHistory().filter(function (row) { return row && row.key !== entry.key; });
666
+ list.unshift(entry);
667
+ window.localStorage.setItem(HISTORY_KEY, JSON.stringify(list.slice(0, HISTORY_MAX)));
668
+ } catch (error) {
669
+ /* private mode, or a hostile localStorage: history is a nicety, never a requirement */
670
+ }
671
+ }
672
+
627
673
  function bumpStat(name, by) {
628
674
  try {
629
675
  var stats = browserStats();
@@ -679,8 +725,36 @@ window.__ModuleLoader__.load({
679
725
  }
680
726
  }
681
727
 
728
+ /**
729
+ * One keyframe pair for the reward flash. Injected rather than inlined because `@keyframes` has
730
+ * no inline form, and gated on `prefers-reduced-motion: reduce` because a scoreboard animation
731
+ * is exactly the kind of motion that setting exists for.
732
+ */
733
+ var MOTION_ID = "misakanet-panel-motion";
734
+
735
+ function ensureMotionCss() {
736
+ if (typeof document === "undefined" || document.getElementById(MOTION_ID)) return;
737
+ var style = document.createElement("style");
738
+ style.id = MOTION_ID;
739
+ style.textContent =
740
+ "@keyframes misakanet-pop{0%{transform:scale(.7);opacity:0}45%{transform:scale(1.08);opacity:1}100%{transform:scale(1);opacity:1}}" +
741
+ "@keyframes misakanet-rise{0%{transform:translateY(2px);opacity:1}100%{transform:translateY(-12px);opacity:0}}" +
742
+ ".misakanet-flash{display:inline-block;font-size:11px;font-weight:600;padding:1px 6px;border-radius:9px;" +
743
+ "background:rgba(34,197,94,.14);color:inherit;animation:misakanet-pop 280ms ease-out,misakanet-rise 900ms ease-out 420ms forwards}" +
744
+ "@media (prefers-reduced-motion: reduce){.misakanet-flash{animation:none}}";
745
+ (document.head || document.body).appendChild(style);
746
+ }
747
+
682
748
  var MUTED = "rgba(127,127,127,0.45)";
683
749
  var DIM = { opacity: 0.72 };
750
+ // A dense panel still needs hierarchy: a hairline + a small uppercase label is what separates
751
+ // sections without adding a sentence to each one. 16px gap, 12px pad, one rule.
752
+ var SECTION_TITLE = {
753
+ marginTop: "16px", paddingTop: "12px", borderTop: "1px solid " + MUTED,
754
+ fontSize: "11px", fontWeight: 600, letterSpacing: "0.04em", textTransform: "uppercase",
755
+ opacity: 0.6,
756
+ };
757
+
684
758
  var BOX = {
685
759
  border: "1px solid " + MUTED,
686
760
  borderRadius: "8px",
@@ -941,6 +1015,8 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
941
1015
  voice: String(payload.voice || ""),
942
1016
  voted: false,
943
1017
  });
1018
+ pushHistory({ key: "s:" + entry.callId, at: entry.at, kind: "search",
1019
+ text: String(entry.query || "").slice(0, 90), lesson: entry.lessonId ? 1 : 0 });
944
1020
  bumpStat("searches");
945
1021
  // Browser playback of the cue the SERVER chose — only when someone turned it on. The local
946
1022
  // hook does the same thing through the machine's own player; this is the browser's copy.
@@ -1412,10 +1488,11 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1412
1488
  .catch(function () { if (alive) setLadder(null); });
1413
1489
  return function () { alive = false; };
1414
1490
  }, []);
1415
- var rows = [h("div", { key: "t", style: { marginTop: "12px", fontWeight: 600, display: "flex",
1416
- alignItems: "baseline", gap: "6px" } },
1491
+ var rows = [h("div", { key: "t", style: Object.assign({}, SECTION_TITLE, { display: "flex",
1492
+ alignItems: "baseline", gap: "6px" }) },
1417
1493
  T("panel.ladder"),
1418
- h("span", { style: Object.assign({}, DIM, { fontWeight: 400 }) }, T("panel.ladder.window")))];
1494
+ h("span", { style: Object.assign({}, DIM, { fontWeight: 400, textTransform: "none",
1495
+ letterSpacing: 0 }) }, T("panel.ladder.window")))];
1419
1496
  if (ladder === undefined) {
1420
1497
  rows.push(h("div", { key: "w", style: DIM }, T("panel.ladder.loading")));
1421
1498
  } else if (!ladder || !ladder.top.length) {
@@ -1425,18 +1502,23 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1425
1502
  var max = top[0].score || 1;
1426
1503
  rows.push(h("div", { key: "r", style: Object.assign({}, BOX, { marginTop: "6px" }) }, top.map(function (entry) {
1427
1504
  var share = Math.max(4, Math.round((entry.score / max) * 100));
1428
- return h("div", { key: "l" + entry.rank, style: { padding: "4px 0" } },
1429
- h("div", { style: { display: "flex", alignItems: "baseline", gap: "8px" } },
1430
- h("span", { style: Object.assign({}, DIM, { width: "16px", textAlign: "right",
1431
- fontVariantNumeric: "tabular-nums" }) }, String(entry.rank)),
1505
+ return h("div", { key: "l" + entry.rank, style: { padding: "5px 0" } },
1506
+ h("div", { style: { display: "flex", alignItems: "center", gap: "8px" } },
1507
+ h("span", { style: { flex: "none", width: "18px", height: "18px", borderRadius: "50%",
1508
+ display: "inline-flex", alignItems: "center", justifyContent: "center",
1509
+ fontSize: "10px", fontVariantNumeric: "tabular-nums",
1510
+ background: "rgba(127,127,127,.16)", opacity: 0.85 } }, String(entry.rank)),
1511
+ entry.login ? h("span", { style: { flex: "none", fontSize: "9px", lineHeight: "1",
1512
+ padding: "2px 4px", borderRadius: "3px", border: "1px solid " + MUTED,
1513
+ opacity: 0.65, letterSpacing: "0.04em" } }, "GH") : null,
1432
1514
  h("span", { style: { flex: "1 1 auto", minWidth: 0, overflow: "hidden",
1433
1515
  textOverflow: "ellipsis", whiteSpace: "nowrap" } }, String(entry.name || entry.node || "")),
1434
- h("span", { style: { flex: "none", fontWeight: 600,
1516
+ h("span", { style: { flex: "none", fontWeight: 600, fontSize: "13px",
1435
1517
  fontVariantNumeric: "tabular-nums" } }, String(entry.score))),
1436
- h("div", { style: { height: "2px", margin: "3px 0 0 24px", borderRadius: "1px",
1437
- background: "rgba(127,127,127,.22)" } },
1518
+ h("div", { style: { height: "3px", margin: "4px 0 0 26px", borderRadius: "2px",
1519
+ background: "rgba(127,127,127,.16)" } },
1438
1520
  h("i", { style: { display: "block", height: "100%", width: share + "%",
1439
- borderRadius: "1px", background: "currentColor", opacity: 0.45 } })));
1521
+ borderRadius: "2px", background: "currentColor", opacity: 0.5 } })));
1440
1522
  })));
1441
1523
  if (ladder.coverage && ladder.coverage.note) {
1442
1524
  rows.push(h("div", { key: "c", style: Object.assign({}, DIM, { marginTop: "4px" }) }, T("panel.ladder.coverage")));
@@ -1464,6 +1546,13 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1464
1546
  // yet", `null` is "asked and there is no ranking". Collapsing them would make the first paint
1465
1547
  // say the endpoint ranked nothing, which is a claim the page has not earned yet — and it would
1466
1548
  // leave no way to tell an empty ranking from one still in flight.
1549
+ // The reward flash: one pop when a search surfaces a lesson. `null` count is "first paint",
1550
+ // which must not flash for rows that were already there when the panel opened.
1551
+ var flashState = react.useState("");
1552
+ var flash = flashState[0];
1553
+ var setFlash = flashState[1];
1554
+ var seenSearches = react.useRef(null);
1555
+
1467
1556
  var hotState = react.useState(undefined);
1468
1557
  var hot = hotState[0];
1469
1558
  var setHot = hotState[1];
@@ -1636,6 +1725,49 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1636
1725
  count(votes.length, T("unit.vote"), T("unit.votes")) + " " + T("panel.strip.helpfulTpl", { count: count(helpful, T("unit.vote"), T("unit.votes")), n: helpful, unit: T("unit.votes") }) +
1637
1726
  count(intakes.length, T("unit.report"), T("unit.reports")) + " " + T("panel.strip.convertedTpl", { count: count(converted, T("unit.report"), T("unit.reports")), n: converted, unit: T("unit.reports") })));
1638
1727
 
1728
+ react.useEffect(function () {
1729
+ var total = searches.length;
1730
+ var reports = intakes.length;
1731
+ if (seenSearches.current === null) {
1732
+ seenSearches.current = { searches: total, intakes: reports };
1733
+ return;
1734
+ }
1735
+ var previous = seenSearches.current;
1736
+ seenSearches.current = { searches: total, intakes: reports };
1737
+ var kind = reports > previous.intakes ? "contrib"
1738
+ : total > previous.searches ? (searches[total - 1] && searches[total - 1].lessonId ? "hit" : "search")
1739
+ : "";
1740
+ if (!kind) return;
1741
+ setFlash(kind);
1742
+ var timer = setTimeout(function () { setFlash(""); }, 1300);
1743
+ return function () { clearTimeout(timer); };
1744
+ }, [searches.length, intakes.length]);
1745
+
1746
+ // What this browser did before this session existed. Shown only when the session has nothing
1747
+ // to show: otherwise the same rows would appear twice, and the session's own list is the
1748
+ // more precise one.
1749
+ if (!searches.length) {
1750
+ var recent = readHistory().slice(0, 4);
1751
+ if (recent.length) {
1752
+ rows.push(h("div", { key: "recent", style: SECTION_TITLE }, T("panel.recent")));
1753
+ rows.push(h("div", { key: "recent-r" }, recent.map(function (row) {
1754
+ return h("div", { key: row.key, style: { display: "flex", gap: "8px", padding: "3px 0" } },
1755
+ h("span", { style: Object.assign({}, DIM, { flex: "none", fontVariantNumeric: "tabular-nums" }) }, clockOf(row.at)),
1756
+ h("span", { style: { flex: "1 1 auto", minWidth: 0, overflow: "hidden",
1757
+ textOverflow: "ellipsis", whiteSpace: "nowrap" } }, String(row.text || "")),
1758
+ h("span", { style: Object.assign({}, DIM, { flex: "none" }) },
1759
+ row.lesson ? T("panel.recent.hit") : T("panel.recent.miss")));
1760
+ })));
1761
+ }
1762
+ }
1763
+
1764
+ ensureMotionCss();
1765
+ if (flash) {
1766
+ rows.push(h("div", { key: "flash", style: { marginTop: "6px" } },
1767
+ h("span", { className: "misakanet-flash" },
1768
+ T(flash === "hit" ? "panel.flash.hit" : flash === "search" ? "panel.flash.search" : "panel.flash.contrib"))));
1769
+ }
1770
+
1639
1771
  // The ladder sits directly under the counters, not at the bottom: it is the one number on this
1640
1772
  // page about the whole network rather than this browser, and it used to be the last thing a
1641
1773
  // reader reached — the review said the placement made a headline look like a footnote.
@@ -1725,10 +1857,14 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1725
1857
  }, T("panel.hint.openLabel")) : null);
1726
1858
  }
1727
1859
 
1728
- rows.push(h("div", { key: "s1", style: { marginTop: "12px", fontWeight: 600 } }, T("panel.asked")));
1729
- if (!searches.length) {
1860
+ // One line when the session has nothing at all, instead of three labelled sections each
1861
+ // saying so. Each section below renders only when it has rows.
1862
+ if (!searches.length && !intakes.length && !lessons.length) {
1730
1863
  rows.push(entryPointHint("s1e", "panel.asked.none"));
1731
- } else {
1864
+ }
1865
+
1866
+ if (searches.length) {
1867
+ rows.push(h("div", { key: "s1", style: SECTION_TITLE }, T("panel.asked")));
1732
1868
  var searchRows = searches.slice().reverse().slice(0, 20).map(function (entry) {
1733
1869
  var key = "q" + entry.callId + entry.at;
1734
1870
  var vote = entry.voted
@@ -1799,7 +1935,6 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1799
1935
  }
1800
1936
 
1801
1937
  // ② reports filed
1802
- rows.push(h("div", { key: "s2", style: { marginTop: "12px", fontWeight: 600 } }, T("panel.reports")));
1803
1938
  var openReports = intakes.filter(function (entry) {
1804
1939
  return entry.state !== "converted" && entry.state !== "answered" && entry.state !== "already_have";
1805
1940
  });
@@ -1812,9 +1947,8 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1812
1947
  rows.push(h("div", { key: "s2h", style: DIM },
1813
1948
  count(openReports.length, T("panel.report.pending")) + T("panel.report.recheck")));
1814
1949
  }
1815
- if (!intakes.length) {
1816
- rows.push(h("div", { key: "s2e", style: DIM }, T("panel.reports.none")));
1817
- } else {
1950
+ if (intakes.length) {
1951
+ rows.push(h("div", { key: "s2", style: SECTION_TITLE }, T("panel.reports")));
1818
1952
  rows.push(h("div", { key: "s2r" }, intakes.slice().reverse().map(function (entry) {
1819
1953
  var labels = {
1820
1954
  filing: "filing", pending: T("intake.waiting"), answered: T("intake.answered"),
@@ -1853,10 +1987,8 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1853
1987
  // every count — no row here can claim the rung, which is also why the rule below is stated once.
1854
1988
  // (`E4` itself is observed elsewhere: `misakanet_me_events` counts distinct clients from
1855
1989
  // `search_signals`, which this browser half likewise cannot read.)
1856
- rows.push(h("div", { key: "s3", style: { marginTop: "12px", fontWeight: 600 } }, T("panel.trust")));
1857
- if (!lessons.length) {
1858
- rows.push(entryPointHint("s3e", "panel.trust.none"));
1859
- } else {
1990
+ if (lessons.length) {
1991
+ rows.push(h("div", { key: "s3", style: SECTION_TITLE }, T("panel.trust")));
1860
1992
  // The rule once, not per row: it is the same sentence for every lesson, and repeating it
1861
1993
  // four times buries the numbers it is there to explain.
1862
1994
  rows.push(h("div", { key: "s3rule", style: DIM },
@@ -1878,24 +2010,19 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1878
2010
  })));
1879
2011
  }
1880
2012
 
1881
- // ④ your activity, two scopes
1882
- rows.push(h("div", { key: "s4", style: { marginTop: "12px", fontWeight: 600 } }, T("panel.activity")));
1883
- rows.push(h("div", { key: "s4r", style: BOX },
1884
- h("div", {}, T("panel.activity.session") + count(searches.length, T("unit.search"), T("unit.searches")) + " · " +
1885
- T("panel.activity.reusedTpl", { count: count(lessons.length, T("unit.lesson"), T("unit.lessons")), n: lessons.length, unit: T("unit.lessons") }) +
1886
- count(votes.length, T("unit.vote"), T("unit.votes")) + " · " +
1887
- T("panel.activity.reportsTpl", { count: count(intakes.length, T("unit.reportFiled"), T("unit.reportsFiled")), n: intakes.length, unit: T("unit.reportsFiled") }) +
1888
- T("panel.activity.filedTpl", { count: count(converted, T("unit.conversion"), T("unit.conversions")), n: converted, unit: T("unit.conversions") })),
1889
- h("div", {}, T("panel.activity.browser") + count(stats.searches || 0, T("unit.search"), T("unit.searches")) + " · " +
1890
- T("panel.activity.reusedTpl", { count: count(stats.lessonsReused || 0, T("unit.lesson"), T("unit.lessons")), n: stats.lessonsReused || 0, unit: T("unit.lessons") }) +
1891
- count(stats.votes || 0, T("unit.vote"), T("unit.votes")) + " · " +
1892
- T("panel.activity.reportsTpl", { count: count(stats.reportsFiled || 0, T("unit.reportFiled"), T("unit.reportsFiled")), n: stats.reportsFiled || 0, unit: T("unit.reportsFiled") }) +
1893
- T("panel.activity.filedTpl", { count: count(stats.reportsConverted || 0, T("unit.conversion"), T("unit.conversions")), n: stats.reportsConverted || 0, unit: T("unit.conversions") })),
1894
- ));
1895
-
1896
- // ⑤ voice
1897
- rows.push(h("div", { key: "s5", style: { marginTop: "12px", fontWeight: 600 } }, T("panel.voice")));
1898
- rows.push(h("div", { key: "s5r", style: BOX },
2013
+ // ④ this browser's counters, one line: the strip above already carries this session's.
2014
+ rows.push(h("div", { key: "s4", style: Object.assign({}, DIM, { marginTop: "6px" }) },
2015
+ T("panel.activity") + " · " + T("panel.activity.browser") +
2016
+ count(stats.searches || 0, T("unit.search"), T("unit.searches")) + " · " +
2017
+ T("panel.activity.reusedTpl", { count: count(stats.lessonsReused || 0, T("unit.lesson"), T("unit.lessons")), n: stats.lessonsReused || 0, unit: T("unit.lessons") }) +
2018
+ count(stats.votes || 0, T("unit.vote"), T("unit.votes")) + " · " +
2019
+ T("panel.activity.reportsTpl", { count: count(stats.reportsFiled || 0, T("unit.reportFiled"), T("unit.reportsFiled")), n: stats.reportsFiled || 0, unit: T("unit.reportsFiled") }) +
2020
+ T("panel.activity.filedTpl", { count: count(stats.reportsConverted || 0, T("unit.conversion"), T("unit.conversions")), n: stats.reportsConverted || 0, unit: T("unit.conversions") })));
2021
+
2022
+ // ⑤ voice: a switch, not a section. The full explanation of the local hook lives in the
2023
+ // footnote details; what a reader needs here is the control.
2024
+ rows.push(h("div", { key: "s5", style: { marginTop: "6px", display: "flex", gap: "8px",
2025
+ alignItems: "center", flexWrap: "wrap" } },
1899
2026
  h("button", {
1900
2027
  type: "button",
1901
2028
  style: BUTTON,
@@ -1904,34 +2031,32 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1904
2031
  setVoiceEnabled(next);
1905
2032
  setVoice(next);
1906
2033
  },
1907
- }, T(voice ? "panel.voice.on" : "panel.voice.off")),
1908
- lastCue && h("button", {
2034
+ }, T("panel.voice") + ": " + T(voice ? "panel.voice.on" : "panel.voice.off")),
2035
+ lastCue ? h("button", {
1909
2036
  type: "button",
1910
2037
  style: BUTTON,
1911
2038
  onClick: function () { playCue(lastCue); },
1912
- }, T("panel.voice.play") + lastCue + "”"),
1913
- h("div", { style: DIM }, lastCue
1914
- ? T("panel.voice.cue") + lastCue + T("panel.voice.cueTail")
1915
- : T("panel.voice.none")),
1916
- h("div", { style: DIM }, T("panel.voice.hook"))));
2039
+ }, T("panel.voice.play") + lastCue + "”") : null,
2040
+ h("span", { style: DIM }, T("panel.voice.hook"))));
1917
2041
 
2042
+ var network = [];
1918
2043
  // ⑥ the network's most-retrieved lessons
1919
2044
  //
1920
2045
  // Read-only, and about the whole network rather than this session: no lesson here had to be
1921
2046
  // surfaced by the agent first. There is no vote affordance in this section and none of its copy
1922
2047
  // says the count is approval — the number is an observed retrieval, and the rule states what it
1923
2048
  // does and does not mean before the first row.
1924
- rows.push(h("div", { key: "s6", style: { marginTop: "12px", fontWeight: 600 } }, T("panel.hot")));
2049
+ network.push(h("div", { key: "s6", style: SECTION_TITLE }, T("panel.hot")));
1925
2050
  if (hot === undefined) {
1926
- rows.push(h("div", { key: "s6w", style: DIM }, T("panel.hot.loading")));
2051
+ network.push(h("div", { key: "s6w", style: DIM }, T("panel.hot.loading")));
1927
2052
  } else if (hot === null) {
1928
2053
  // The endpoint ranked nothing (or did not answer). Saying so beats printing five rows of
1929
2054
  // `0 retrievals`, which would name lessons the payload never ranked.
1930
- rows.push(h("div", { key: "s6e", style: DIM }, T("panel.hot.none")));
2055
+ network.push(h("div", { key: "s6e", style: DIM }, T("panel.hot.none")));
1931
2056
  } else {
1932
- rows.push(h("div", { key: "s6rule", style: DIM }, T("panel.hot.rule")));
1933
- rows.push(h("div", { key: "s6l", style: DIM }, T("panel.hot.limit", { n: HOT_LESSON_LIMIT })));
1934
- rows.push(h("div", { key: "s6r" }, hot.slice(0, HOT_LESSON_LIMIT).map(function (entry) {
2057
+ network.push(h("div", { key: "s6rule", style: DIM }, T("panel.hot.rule")));
2058
+ network.push(h("div", { key: "s6l", style: DIM }, T("panel.hot.limit", { n: HOT_LESSON_LIMIT })));
2059
+ network.push(h("div", { key: "s6r" }, hot.slice(0, HOT_LESSON_LIMIT).map(function (entry) {
1935
2060
  var path = String(entry && entry.lesson_id ? entry.lesson_id : "");
1936
2061
  var times = entry && typeof entry.count === "number" ? entry.count : null;
1937
2062
  return h("div", { key: "h" + path, style: { borderTop: "1px solid " + MUTED, padding: "4px 0" } },
@@ -1954,24 +2079,24 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1954
2079
  // searched first. There is no vote affordance in this section and none of its copy says the order
1955
2080
  // is approval — `unsolved30d` counts unanswered searches, and the rule says what it counts before
1956
2081
  // the first row and how it differs from the retrieval ranking above.
1957
- rows.push(h("div", { key: "s7", style: { marginTop: "12px", fontWeight: 600 } }, T("panel.coverage")));
2082
+ network.push(h("div", { key: "s7", style: SECTION_TITLE }, T("panel.coverage")));
1958
2083
  if (coverage === undefined) {
1959
- rows.push(h("div", { key: "s7w", style: DIM }, T("panel.coverage.loading")));
2084
+ network.push(h("div", { key: "s7w", style: DIM }, T("panel.coverage.loading")));
1960
2085
  } else if (coverage === null) {
1961
2086
  // The board ranked nothing (or did not answer). Saying so beats printing rows of `0`, which
1962
2087
  // would name topics the payload never ranked.
1963
- rows.push(h("div", { key: "s7e", style: DIM }, T("panel.coverage.none")));
2088
+ network.push(h("div", { key: "s7e", style: DIM }, T("panel.coverage.none")));
1964
2089
  } else {
1965
- rows.push(h("div", { key: "s7rule", style: DIM }, T("panel.coverage.rule")));
2090
+ network.push(h("div", { key: "s7rule", style: DIM }, T("panel.coverage.rule")));
1966
2091
  var coverageMetrics = coverage.metrics || {};
1967
2092
  if (typeof coverageMetrics.publishedLessons === "number") {
1968
- rows.push(h("div", { key: "s7t", style: DIM },
2093
+ network.push(h("div", { key: "s7t", style: DIM },
1969
2094
  T("panel.coverage.totals", {
1970
2095
  count: count(coverageMetrics.publishedLessons, T("unit.lesson"), T("unit.lessons")),
1971
2096
  n: coverageMetrics.publishedLessons, unit: T("unit.lessons"),
1972
2097
  })));
1973
2098
  }
1974
- rows.push(h("div", { key: "s7r" }, coverage.gaps.slice(0, COVERAGE_LIMIT).map(function (gap) {
2099
+ network.push(h("div", { key: "s7r" }, coverage.gaps.slice(0, COVERAGE_LIMIT).map(function (gap) {
1975
2100
  return h("div", { key: "f" + gap.taskFamily, style: { borderTop: "1px solid " + MUTED, padding: "4px 0" } },
1976
2101
  h("span", {}, gap.taskFamily),
1977
2102
  h("span", { style: DIM }, " " + T("panel.coverage.lessonsTpl", {
@@ -1985,6 +2110,14 @@ var DEFAULT_MCP_URL = "https://misakanet.org/mcp";
1985
2110
  })));
1986
2111
  }
1987
2112
 
2113
+ // ⑥ and ⑦ answer a maintainer's question — what the corpus returns most, and where it has
2114
+ // nothing to return. A person opening the sidebar acts on none of it, so it is folded away:
2115
+ // present in one click, out of the default reading path.
2116
+ rows.push(h("details", { key: "network", style: { marginTop: "16px", paddingTop: "12px", borderTop: "1px solid " + MUTED } },
2117
+ h("summary", { style: { cursor: "pointer", fontSize: "11px", fontWeight: 600,
2118
+ letterSpacing: "0.04em", textTransform: "uppercase", opacity: 0.6 } }, T("panel.network")),
2119
+ h("div", null, network)));
2120
+
1988
2121
  rows.push(h("details", { key: "foot", style: Object.assign({}, DIM, { marginTop: "12px" }) },
1989
2122
  h("summary", { style: { cursor: "pointer" } }, T("panel.sources")),
1990
2123
  h("div", { style: { marginTop: "4px" } }, T("panel.footnote"))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "misakanet",
3
- "version": "3.12.2",
3
+ "version": "3.14.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "MisakaNet failure-memory skill — evidence-rated failure lessons for AI agents. DSH bundle: registers the MCP tools as mcp__misakanet__* (misakanet_search/get_lesson/…), served by the public Streamable HTTP endpoint https://misakanet.org/mcp — live tools from an npm install, in any profile, with no local python. A profile that prefers the repo's own stdio server can override the bundle row.",
6
6
  "icon": "icon.svg",