dsh-skill-browser 2.0.2 → 2.0.14

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/lib/mcp.js CHANGED
@@ -29,7 +29,7 @@ var MARK_END = "# ==== dsh-skill-browser:mcp-managed END ====";
29
29
 
30
30
  var SENSITIVE_RE = /(token|key|secret|password|passwd|pwd|credential|auth|api[-_]?key)/i;
31
31
 
32
- function dataDir() { return join(homedir(), ".dsh", "data", "dsh-skill-browser"); }
32
+ export function dataDir() { return join(homedir(), ".dsh", "data", "dsh-skill-browser"); }
33
33
  export function mcpStatsFile() { return join(dataDir(), "mcp-calls.jsonl"); }
34
34
  function backupDir() { return join(homedir(), ".dsh", "backups"); }
35
35
 
@@ -533,6 +533,179 @@ export function setMcpEnabled(ctx, id, enabled) {
533
533
  };
534
534
  }
535
535
 
536
+ // ─────────────────────────── 卸载(删除条目块) ───────────────────────────
537
+ // v2.0.3:把一条 MCP 从 profile 补丁文件里真正删掉(不是禁用)。
538
+ // 文本级、缩进感知,因为真实文件里条目有两种形态:
539
+ // ① 直接挂在顶级:`- id: xxx` 缩进 0
540
+ // ② 挂在 `- insert:` 里:` - id: xxx` 缩进 4
541
+ // 删除范围 = 从 `- id:` 行起,吞掉所有缩进更深的内容行(serverName / transport /
542
+ // command / args / env ...),到下一个缩进 <= 该行的非空行为止。
543
+ // 三种必须一并处理的连带物:
544
+ // · 条目正上方若有一组专属注释(注释里出现了该 id),一起删,否则留下孤零零的中文注释块
545
+ // · 父级 `- insert:` 删完若只剩空壳(没有兄弟条目、也没有非注释内容)→ 连父级行删掉,
546
+ // 否则 YAML 里变成 `insert: null`,loader 会报错
547
+ // · 受管覆盖块(MARK_BEGIN/END)里若残留同 id 的 disabled 覆盖 → 一并清掉,避免死引用告警
548
+ function removeEntryBlock(text, id) {
549
+ var eol = text.indexOf("\r\n") >= 0 ? "\r\n" : "\n";
550
+ var lines = text.split(/\r?\n/);
551
+ var want = String(id);
552
+
553
+ // 1) 精确定位 `- id: <want>`(支持单/双引号、行尾注释)
554
+ var idx = -1, indent = 0;
555
+ for (var i = 0; i < lines.length; i++) {
556
+ var m = lines[i].match(/^([ \t]*)-[ \t]*id:[ \t]*(?:"([^"]*)"|'([^']*)'|([^#\s]+))[ \t]*(?:#.*)?$/);
557
+ if (!m) continue;
558
+ var got = (m[2] != null ? m[2] : (m[3] != null ? m[3] : m[4])) || "";
559
+ if (got === want) { idx = i; indent = m[1].length; break; }
560
+ }
561
+ if (idx < 0) return { removed: false, text: text, reason: "没有 `- id: " + want + "` 行" };
562
+
563
+ // 2) 块尾:第一个缩进 <= indent 的非空行;尾部空行不算块内
564
+ var end = idx + 1;
565
+ while (end < lines.length) {
566
+ var ln = lines[end];
567
+ if (!ln.trim()) { end++; continue; }
568
+ if (/^[ \t]*/.exec(ln)[0].length <= indent) break;
569
+ end++;
570
+ }
571
+ while (end > idx + 1 && !lines[end - 1].trim()) end--;
572
+ var removedLines = end - idx;
573
+
574
+ // 3) 认领专属注释:向上跳过空行收集连续 `#` 行,只有注释里出现该 id(或去掉
575
+ // mcp- 前缀的主体,例如注释写 ansys-fluent)才认为这段注释属于该条目,
576
+ // 否则保留(通用注释块 / 别的条目的说明)。
577
+ var key = want.replace(/^mcp-/, "");
578
+ function claimComment(a, b) {
579
+ var hasComment = false, hit = false;
580
+ for (var z = a; z < b; z++) {
581
+ if (!lines[z].trim()) continue;
582
+ if (/^[ \t]*#/.test(lines[z])) hasComment = true;
583
+ if (lines[z].indexOf(want) >= 0 || (key && key !== want && lines[z].indexOf(key) >= 0)) hit = true;
584
+ }
585
+ return hasComment && hit;
586
+ }
587
+ var c = idx - 1;
588
+ while (c >= 0) {
589
+ var t = lines[c];
590
+ if (!t.trim()) { c--; continue; }
591
+ if (/^[ \t]*#/.test(t)) { c--; continue; }
592
+ break;
593
+ }
594
+ var from = idx;
595
+ var candStart = c + 1;
596
+ if (claimComment(candStart, idx)) {
597
+ from = candStart;
598
+ while (from < idx && !lines[from].trim()) from++;
599
+ }
600
+
601
+ // 4) 父级空壳:`- insert:` 下若没有兄弟条目、也没有非注释内容,连父级行一起
602
+ // 删(否则 YAML 留下 `insert: null`,loader 会报错);此时再把 insert 上方
603
+ // 的专属注释也认领进来,避免留下孤零零的中文说明。
604
+ var p = from - 1;
605
+ while (p >= 0 && !lines[p].trim()) p--;
606
+ var parentDropped = false;
607
+ if (p >= 0) {
608
+ var pm = lines[p].match(/^([ \t]*)(?:-[ \t]*)?(insert|plugins|entries|items):[ \t]*(?:#.*)?$/);
609
+ if (pm && pm[1].length < indent) {
610
+ var pInd = pm[1].length;
611
+ var hasItem = false, hasContent = false;
612
+ var q = p + 1;
613
+ while (q < lines.length) {
614
+ var l2 = lines[q];
615
+ if (!l2.trim()) { q++; continue; }
616
+ if (q >= from && q < end) { q++; continue; } // 正在删的这段不算「还有内容」
617
+ if (/^[ \t]*/.exec(l2)[0].length <= pInd) break;
618
+ if (/^[ \t]*-[ \t]*id:/.test(l2)) { hasItem = true; break; }
619
+ if (!/^[ \t]*#/.test(l2)) hasContent = true;
620
+ q++;
621
+ }
622
+ if (!hasItem && !hasContent) {
623
+ parentDropped = true;
624
+ var c2 = p - 1;
625
+ while (c2 >= 0) {
626
+ var t2 = lines[c2];
627
+ if (!t2.trim()) { c2--; continue; }
628
+ if (/^[ \t]*#/.test(t2)) { c2--; continue; }
629
+ break;
630
+ }
631
+ var cand2 = c2 + 1;
632
+ // insert: 是自动生成式容器,紧贴在它上面的连续注释几乎必然是它的说明;
633
+ // 但限制 25 行,避免把文件头部的大段说明/许可注释一起吃掉。
634
+ if (cand2 < p && (p - cand2) <= 25) {
635
+ from = cand2;
636
+ while (from < p && !lines[from].trim()) from++;
637
+ }
638
+ // 父级行自身必须落在删除区间内:insert: 上方没有专属注释时 from 仍指向
639
+ // 条目行,只删条目会留下 `- insert:` 空壳(YAML 里就是 insert: null)。
640
+ if (from > p) from = p;
641
+ }
642
+ }
643
+ }
644
+ // 父级行本身落在 [from, end) 内(from <= p < idx < end),一并删除
645
+ var rest = lines.slice(0, from).concat(lines.slice(end));
646
+
647
+ // 5) 收口:压缩连续空行、去掉尾部空行、保证单尾换行
648
+ var out = [];
649
+ for (var k = 0; k < rest.length; k++) {
650
+ if (!rest[k].trim() && out.length && !out[out.length - 1].trim()) continue;
651
+ out.push(rest[k]);
652
+ }
653
+ while (out.length && !out[out.length - 1].trim()) out.pop();
654
+ return { removed: true, text: out.join(eol) + eol, lines: removedLines, parentDropped: parentDropped };
655
+ }
656
+
657
+ // 受管覆盖块里去掉一个 id(保持即使变成空块也整体移除)
658
+ function dropManagedId(text, id) {
659
+ var ids = parseManagedBlock(text);
660
+ if (ids.indexOf(id) < 0) return text;
661
+ var kept = ids.filter(function (x) { return x !== id; });
662
+ var eol = text.indexOf("\r\n") >= 0 ? "\r\n" : "\n";
663
+ var stripped = stripManagedBlock(text);
664
+ if (!kept.length) return /[\r\n]$/.test(stripped) || !stripped.length ? stripped : stripped + eol;
665
+ var block = [MARK_BEGIN];
666
+ kept.slice().sort().forEach(function (x) { block.push("- id: " + x); block.push(" disabled: true"); });
667
+ block.push(MARK_END);
668
+ var base = /[\r\n]$/.test(stripped) || !stripped.length ? stripped : stripped + eol;
669
+ return base + block.join(eol) + eol;
670
+ }
671
+
672
+ // 卸载:从承载文件里删条目块(含专属注释、空壳 insert、受管覆盖),写盘前先备份
673
+ export function uninstallMcp(ctx, id) {
674
+ var data = collectMcp(ctx, true);
675
+ var target = null;
676
+ for (var i = 0; i < data.servers.length; i++) if (data.servers[i].id === id) target = data.servers[i];
677
+ if (!target) return { ok: false, error: "找不到 MCP 条目: " + id };
678
+
679
+ var file = target.patchFile;
680
+ if (!file || !existsSync(file) || !safeContains(file, id)) file = fallbackPatchFile(id);
681
+ if (!file || !existsSync(file)) {
682
+ return {
683
+ ok: false,
684
+ error: "该条目不在任何 profile 补丁文件里(可能来自内置层或 npm 包自带配置),无法卸载;可以先「停用」"
685
+ };
686
+ }
687
+
688
+ var raw = readFileSync(file, "utf8");
689
+ var del = removeEntryBlock(raw, id);
690
+ if (!del.removed) {
691
+ return { ok: false, error: "在 " + basename(file) + " 里没有定位到 id 为 " + id + " 的条目行(" + (del.reason || "") + ")" };
692
+ }
693
+ var out = dropManagedId(del.text, id);
694
+ backupFile(file);
695
+ writeFileSync(file, out, "utf8");
696
+
697
+ return {
698
+ ok: true,
699
+ file: file,
700
+ removedLines: del.lines,
701
+ parentDropped: !!del.parentDropped,
702
+ serverName: target.serverName,
703
+ note: "已从 " + basename(file) + " 删除该条目"
704
+ + (del.parentDropped ? "(并清掉了空的 insert: 容器)" : "")
705
+ + ",DSH 用户补丁层会热重载;同时已备份到 ~/.dsh/backups/"
706
+ };
707
+ }
708
+
536
709
  // 重连:纯内存重启该条目,不动文件
537
710
  export async function reconnectMcp(ctx, id) {
538
711
  var entry = null;
@@ -850,4 +1023,194 @@ export function cleanMcpResidue(ctx) {
850
1023
  return { ok: true, cleaned: cleaned, details: details };
851
1024
  }
852
1025
 
1026
+ // ── MCP 市场安装:新增一条 MCP(写入 profile 补丁文件的 insert 块)──
1027
+ // spec = { name, transport:'stdio'|'streamable-http', command, args[], env{}, cwd, url, headers{},
1028
+ // toolCallTimeoutMs, failOnStartupError }
1029
+ function _yamlValue(v) {
1030
+ // YAML 安全引号:非「保守安全裸标量」的值一律单引号包裹(内部单引号转义为 '')。
1031
+ // 保守安全 = 字母/数字/下划线开头 + 字母数字下划线点斜杠短横线,或纯数字。
1032
+ // 这样 @deepseek-ai/dsh-mcp-client、含空格的路径、以 - 开头的参数等都会被安全引用,
1033
+ // 避免裸写 @ 开头 / - 开头等导致解析失败。
1034
+ if (v === undefined || v === null) return "";
1035
+ if (typeof v === "boolean") return v ? "true" : "false";
1036
+ if (typeof v === "number") return String(v);
1037
+ var s = String(v);
1038
+ if (s === "") return "''";
1039
+ var safe = /^[A-Za-z0-9_][A-Za-z0-9_./-]*$/.test(s) || /^[+-]?\d+(\.\d+)?$/.test(s);
1040
+ if (!safe) return "'" + s.replace(/'/g, "''") + "'";
1041
+ return s;
1042
+ }
1043
+
1044
+ // 找最后一个顶格 `- insert:` 块(不越过 MARK_BEGIN),返回 {start, end}
1045
+ // 可指定 preferPackage:若传入则优先返回「块内含该包名」的最后一个 insert 块。
1046
+ function _findLastInsertBlock(lines, markBeginLine, preferPackage) {
1047
+ var tops = [];
1048
+ for (var i = 0; i < lines.length; i++) {
1049
+ if (lines[i] === "" || lines[i][0] === " " || lines[i][0] === "\t") continue; // 缩进行不是顶格 insert
1050
+ if (/^- insert:/.test(lines[i])) tops.push(i);
1051
+ }
1052
+ if (!tops.length) return null;
1053
+ // 计算每个 insert 块的结束行(下一行顶格非缩进行,或 MARK_BEGIN,或 EOF)
1054
+ var bounds = tops.map(function (start) {
1055
+ var end = lines.length;
1056
+ for (var j = start + 1; j < lines.length; j++) {
1057
+ if (lines[j] === "" || lines[j][0] === " " || lines[j][0] === "\t") continue;
1058
+ if (markBeginLine >= 0 && j >= markBeginLine) { end = markBeginLine; break; }
1059
+ end = j; break;
1060
+ }
1061
+ return { start: start, end: end };
1062
+ });
1063
+ // 过滤:start 必须在 MARK_BEGIN 之前
1064
+ var usable = bounds.filter(function (b) { return markBeginLine < 0 || b.start < markBeginLine; });
1065
+ if (!usable.length) return null;
1066
+ if (preferPackage) {
1067
+ for (var p = usable.length - 1; p >= 0; p--) {
1068
+ var chunk = lines.slice(usable[p].start, usable[p].end).join("\n");
1069
+ if (chunk.indexOf(preferPackage) >= 0) return usable[p];
1070
+ }
1071
+ }
1072
+ return usable[usable.length - 1];
1073
+ }
1074
+
1075
+ function _buildInsertLines(spec, id, eol) {
1076
+ var L = [];
1077
+ var pad = " "; // 条目行缩进 4
1078
+ var pad6 = " "; // 字段缩进 6
1079
+ L.push(pad + "- id: " + id);
1080
+ L.push(pad6 + "name: " + _yamlValue(MCP_PKG));
1081
+ L.push(pad6 + "config:");
1082
+ var c8 = " ";
1083
+ L.push(c8 + "serverName: " + _yamlValue(spec.name));
1084
+ L.push(c8 + "transport: " + _yamlValue(spec.transport));
1085
+ if (spec.transport === "stdio") {
1086
+ if (spec.command) L.push(c8 + "command: " + _yamlValue(spec.command));
1087
+ if (Array.isArray(spec.args) && spec.args.length) {
1088
+ L.push(c8 + "args:");
1089
+ spec.args.forEach(function (a) { L.push(c8 + " - " + _yamlValue(a)); });
1090
+ }
1091
+ if (spec.cwd) L.push(c8 + "cwd: " + _yamlValue(spec.cwd));
1092
+ } else {
1093
+ if (spec.url) L.push(c8 + "url: " + _yamlValue(spec.url));
1094
+ }
1095
+ if (spec.env && typeof spec.env === "object") {
1096
+ var envKeys = Object.keys(spec.env);
1097
+ if (envKeys.length) {
1098
+ L.push(c8 + "env:");
1099
+ envKeys.forEach(function (k) { L.push(c8 + " " + _yamlValue(k) + ": " + _yamlValue(spec.env[k])); });
1100
+ }
1101
+ }
1102
+ if (spec.headers && typeof spec.headers === "object") {
1103
+ var hKeys = Object.keys(spec.headers);
1104
+ if (hKeys.length) {
1105
+ L.push(c8 + "headers:");
1106
+ hKeys.forEach(function (k) { L.push(c8 + " " + _yamlValue(k) + ": " + _yamlValue(spec.headers[k])); });
1107
+ }
1108
+ }
1109
+ L.push(c8 + "failOnStartupError: " + (spec.failOnStartupError === true ? "true" : "false"));
1110
+ var tmo = typeof spec.toolCallTimeoutMs === "number" && spec.toolCallTimeoutMs > 0 ? spec.toolCallTimeoutMs : 60000;
1111
+ L.push(c8 + "toolCallTimeoutMs: " + tmo);
1112
+ return L;
1113
+ }
1114
+
1115
+ // 确认新内容里是否已存在该 id 的条目(文本级查重,用于热重载未生效时兜底)
1116
+ function _textHasEntryId(text, id) {
1117
+ var re = new RegExp("(?:^|\\n)[ \\t]*" + "- id: " + id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "(?:\\n|$)", "m");
1118
+ return re.test(text);
1119
+ }
1120
+
1121
+ export function installMcp(ctx, spec) {
1122
+ try {
1123
+ spec = spec || {};
1124
+ var name = String(spec.name || "").trim();
1125
+ var transport = String(spec.transport || "").trim();
1126
+
1127
+ // ① 字段校验
1128
+ if (!/^[a-zA-Z0-9_-]{1,32}$/.test(name)) {
1129
+ return { ok: false, error: "serverName 只能是 1~32 位字母数字下划线短横线" };
1130
+ }
1131
+ if (transport !== "stdio" && transport !== "streamable-http") {
1132
+ return { ok: false, error: "transport 只能是 stdio 或 streamable-http" };
1133
+ }
1134
+ if (transport === "stdio" && !spec.command) {
1135
+ return { ok: false, error: "stdio 传输必须提供 command" };
1136
+ }
1137
+ if (transport === "streamable-http" && !spec.url) {
1138
+ return { ok: false, error: "streamable-http 传输必须提供 url" };
1139
+ }
1140
+
1141
+ var id = "mcp-" + name;
1142
+
1143
+ // ② 查重(registry/当前已配置)
1144
+ var data = collectMcp(ctx, true);
1145
+ var exists = null;
1146
+ for (var i = 0; i < data.servers.length; i++) {
1147
+ if (String(data.servers[i].serverName).toLowerCase() === name.toLowerCase()) { exists = data.servers[i]; break; }
1148
+ }
1149
+ if (exists) {
1150
+ return { ok: false, error: "已存在同名 MCP(serverName: " + name + "),请先卸载或在配置里改名" };
1151
+ }
1152
+
1153
+ // ③ 定位 patch 文件
1154
+ var file = null;
1155
+ for (var j = 0; j < data.servers.length; j++) {
1156
+ if (data.servers[j].patchFile && existsSync(data.servers[j].patchFile)) { file = data.servers[j].patchFile; break; }
1157
+ }
1158
+ if (!file) file = fallbackPatchFile("mcp-" + name);
1159
+ if (!file) {
1160
+ var fallback = join(homedir(), ".dsh", "profiles", "desktop", "cordis.patch.yml");
1161
+ if (existsSync(fallback)) file = fallback;
1162
+ }
1163
+ if (!file || !existsSync(file)) {
1164
+ return { ok: false, error: "无法定位可写的 profile 补丁文件(cordis.patch.yml)" };
1165
+ }
1166
+
1167
+ // ⑧ 文本级查重:热重载未生效时 collectMcp 可能看不到,直接查文件文本
1168
+ var raw = readFileSync(file, "utf8");
1169
+ if (_textHasEntryId(raw, id)) {
1170
+ return { ok: false, error: "已存在同名 MCP(serverName: " + name + "),请先卸载或在配置里改名" };
1171
+ }
1172
+
1173
+ // ④ 生成条目文本
1174
+ var eol = raw.indexOf("\r\n") >= 0 ? "\r\n" : "\n";
1175
+ var lines = raw.split(/\r?\n/);
1176
+
1177
+ // ⑤ 找最后一个顶格 insert 块(避开受管块)
1178
+ var markBeginLine = -1;
1179
+ for (var m = 0; m < lines.length; m++) {
1180
+ if (lines[m].indexOf(MARK_BEGIN) >= 0) { markBeginLine = m; break; }
1181
+ }
1182
+ var blk = _findLastInsertBlock(lines, markBeginLine, MCP_PKG);
1183
+ var insertLines = _buildInsertLines(spec, id, eol);
1184
+ var out;
1185
+
1186
+ if (blk) {
1187
+ // 追加到该块已有条目之后(保持 4 空格缩进)
1188
+ var head = lines.slice(0, blk.end).join(eol);
1189
+ out = head + eol + insertLines.join(eol) + (blk.end < lines.length ? eol + lines.slice(blk.end).join(eol) : "");
1190
+ } else {
1191
+ // 无 insert 块:在 MARK_BEGIN 之前(或文件末尾)新建一个 insert 块
1192
+ var anchor = markBeginLine >= 0 ? markBeginLine : lines.length;
1193
+ var prefix = lines.slice(0, anchor).join(eol);
1194
+ out = prefix + (prefix.length ? eol : "") + "# ---- MCP 市场安装 ----" + eol + "- insert:" + eol +
1195
+ insertLines.join(eol) + (anchor < lines.length ? eol + lines.slice(anchor).join(eol) : "");
1196
+ }
1197
+
1198
+ // ⑥ 写盘(先备份)
1199
+ backupFile(file);
1200
+ writeFileSync(file, out, "utf8");
1201
+ _mcpListCache = { ts: 0, data: null }; // 配置变了,失效列表缓存
1202
+
1203
+ // ⑦ 返回
1204
+ return {
1205
+ ok: true,
1206
+ file: file,
1207
+ id: id,
1208
+ serverName: name,
1209
+ note: "配置已写入,DSH 补丁层会热重载(1~2 秒后可在 MCP 页看到)"
1210
+ };
1211
+ } catch (e) {
1212
+ return { ok: false, error: String((e && e.message) || e) };
1213
+ }
1214
+ }
1215
+
853
1216
  export var MCP_META = { pkg: MCP_PKG, markBegin: MARK_BEGIN, markEnd: MARK_END };
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Skills & MCP Browser",
4
- "description": "One floating ball opens a panel that turns your local skill library into something you can browse, search and govern: one/two-level categories plus custom groups (tree/flat views, manual groups, instant keyword grouping, AI auto-grouping with AI covers — grouping is view-only and never moves skill files), per-skill version badges with a \"no version yet\" fallback, per-card / per-category / library-wide enable-disable with automatic backups, and a full SKILL.md viewer. A call-ledger dashboard adds date ranges, day/week/month/year granularity, rankings, trend chart and failure details, fed automatically by the host's tools/result event. An MCP panel adds live MCP config and status, tool inventory with auto Chinese summaries, per-server call statistics, enable/disable and reconnect, plus standard mcpServers JSON export. One-click hot reload, all 128 ball skins contrast-adaptive, configurable skill root, draggable and resettable ball.. MCP management (live config/status/tools/call stats, enable/disable, reconnect, export, local MCP scan and AI fix); AI grouping ships with result cache and a progress timer."
4
+ "description": "One floating ball opens a panel that turns your local skill library into something you can browse, search and govern: one/two-level categories plus custom groups (tree/flat views, manual groups, instant keyword grouping, AI auto-grouping with AI covers — grouping is view-only and never moves skill files), per-skill version badges with a \"no version yet\" fallback, per-card / per-category / library-wide enable-disable with automatic backups, and a full SKILL.md viewer. A call-ledger dashboard adds date ranges, day/week/month/year granularity, rankings, trend chart and failure details, fed automatically by the host's tools/result event. A Market tab adds an MCP market: the official MCP Registry plus a curated free catalog of 29 entries (24 npm / 5 pypi), 19 categories in flat mode with per-category counts, grid or list layout with cards cloned from the skill cards, each MCP rendered with its own real icon, one-click install that writes the profile cordis.patch.yml after an automatic backup, one-click uninstall, a free-only filter, a 24-hour disk cache and two-way instant sync with the MCP tab; the panel now has five tabs (Skills, Call Ledger, MCP, Market, Quick Start with 9 steps). An MCP panel adds live MCP config and status, tool inventory with auto Chinese summaries, per-server call statistics, enable/disable with instant UI follow, reconnect, MCP uninstall, plus standard mcpServers JSON export; a local MCP scan lists configured and installed-but-unconfigured MCP packages, and AI fix diagnoses broken MCP servers and proposes repair actions. One-click hot reload, all 130 ball skins contrast-adaptive, configurable skill root, draggable and resettable ball. The panel remembers its last scroll position and never jumps back to the top on redraw; skill cards support 3-6 per row, MCP cards 3-5 and market cards 3-6. AI grouping ships with result cache and a progress timer."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "技能与 MCP 浏览器",
4
- "description": "技能与 MCP 浏览器:悬浮球打开面板,把本机技能库变成可浏览、可检索、可治理的资产——两级分类 + 自定义分组(树状/平铺双模式、手动建组、⚡关键词分组、🤖AI 自动分组与 AI 封面,分组只改视图不动技能文件)、版本号徽章(无版本显示「暂未编版本号」)、单卡/分类/全库启停(自动备份)、SKILL.md 全文查看;调用台账看板(起止日期 + 日/周/月/年 + 排行榜 + 趋势图 + 失效明细),监听 tools/result 自动登记每次技能调用结果。⚡ 一键热重载,MCP 管理(读取运行时 MCP 配置与真实状态、工具清单与自动中文概括、调用统计落盘、启停/重连、导出标准 mcpServers JSON),128 款皮肤全量自适应配色,技能库位置可配置,悬浮球可拖拽可复位;本机 MCP 扫描(列出已配置与已装未配置的 MCP 包)与 AI 修复(诊断异常 MCP 并给出修复动作);AI 分组带结果缓存与计时浮窗。"
4
+ "description": "技能与 MCP 浏览器:悬浮球打开面板,把本机技能库变成可浏览、可检索、可治理的资产——两级分类 + 自定义分组(树状/平铺双模式、手动建组、⚡关键词分组、🤖AI 自动分组与 AI 封面,分组只改视图不动技能文件)、版本号徽章(无版本显示「暂未编版本号」)、单卡/分类/全库启停(自动备份)、SKILL.md 全文查看;调用台账看板(起止日期 + 日/周/月/年 + 排行榜 + 趋势图 + 失效明细),监听 tools/result 自动登记每次技能调用结果。⚡ 一键热重载,面板共五个 Tab(技能浏览 / 调用台账 / MCP 管理 / 市场 / 快速上手),市场(MCP 市场:官方 MCP Registry + 29 条精选免费目录、19 大类平铺分类带每类数量、网格/列表双模式、卡片逐字复刻技能卡、每条 MCP 用其自身真实图标、一键安装写入 cordis.patch.yml 并自动备份 / 一键卸载、仅免费筛选、24 小时磁盘缓存、与 MCP 页双向即时同步),MCP 管理(读取运行时 MCP 配置与真实状态、工具清单与自动中文概括、调用统计落盘、启停即时跟手/重连/卸载、导出标准 mcpServers JSON),130 款皮肤全量自适应配色,技能库位置可配置,悬浮球可拖拽可复位;本机 MCP 扫描(列出已配置与已装未配置的 MCP 包)与 AI 修复(诊断异常 MCP 并给出修复动作);面板记住上次滚动位置、重绘不跳顶,技能卡每行 3~6 列、MCP 卡片每行 3~5 列、市场卡片每行 3~6 列;9 步快速上手;AI 分组带结果缓存与计时浮窗。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-skill-browser",
3
- "version": "2.0.2",
4
- "description": "技能浏览器:悬浮球打开面板,把本机技能库变成可浏览、可检索、可治理的资产——四个 Tab(技能浏览/调用台账/MCP 管理/快速上手)、树状/平铺双视图、手动+关键词+AI 三种分组(分组只改视图不动技能文件)、调用台账看板(调用次数/成功率/趋势图/技能调用排行)、130 款三球同步皮肤(6 列宽屏菜单)、7 步快速上手、MCP 管理(读取运行时 MCP 配置、真实连接状态、工具清单与自动功能概括、调用统计落盘、启停/重连、导出标准 mcpServers JSON)、DSH 设置页悬浮球导航分区;一键热重载,技能库位置可配置,悬浮球可拖拽可复位。",
3
+ "version": "2.0.14",
4
+ "description": "技能浏览器:悬浮球打开面板,把本机技能库变成可浏览、可检索、可治理的资产——五个 Tab(技能浏览/调用台账/MCP 管理/市场/快速上手)、树状/平铺双视图、手动+关键词+AI 三种分组(分组只改视图不动技能文件)、调用台账看板(调用次数/成功率/趋势图/技能调用排行)、130 款三球同步皮肤(6 列宽屏菜单)、9 步快速上手、MCP 管理(读取运行时 MCP 配置、真实连接状态、工具清单与自动功能概括、调用统计落盘、启停即时跟随/重连/卸载/导出标准 mcpServers JSON、重绘不跳顶且面板记忆上次滚动位置、卡片每行列数技能 3~6 / MCP 3~5)、DSH 设置页悬浮球导航分区;一键热重载,技能库位置可配置,悬浮球可拖拽可复位、市场(MCP 市场:官方 Registry + 29 条精选免费目录、19 大类平铺分类带每类数量、网格/列表双模式、卡片逐字复刻技能卡、每条 MCP 用其自身真实图标并自动降级、一键安装写入 cordis.patch.yml 并自动备份、一键卸载、仅免费筛选、24 小时磁盘缓存、与 MCP 页双向即时同步)。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "sideEffects": false,
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "files": [
20
20
  "lib/**/*.js",
21
+ "lib/**/*.json",
21
22
  "lib/**/*.ps1",
22
23
  "cordis.patch.yml",
23
24
  "README.md",
@@ -31,7 +32,8 @@
31
32
  "README-es.md",
32
33
  "README-pt.md",
33
34
  "README-hi.md",
34
- "scripts"
35
+ "scripts",
36
+ "screenshots.json"
35
37
  ],
36
38
  "license": "MIT",
37
39
  "keywords": [
@@ -0,0 +1,10 @@
1
+ [
2
+ "docs/images/shot-01.png",
3
+ "docs/images/shot-09.png",
4
+ "docs/images/shot-06.png",
5
+ "docs/images/shot-05.png",
6
+ "docs/images/shot-10.png",
7
+ "docs/images/shot-11.png",
8
+ "docs/images/shot-12.png",
9
+ "docs/images/shot-13.png"
10
+ ]