@lmzhen/dsh-evolution-skill-health 0.32.3 → 0.32.5
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/README.md +11 -16
- package/lib/client.js +1 -1
- package/lib/index.js +8 -5
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
# @lmzhen/dsh-evolution-skill-health
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
让"哪条规则在哪些技能上出现、本次改动新引入了什么"一眼可见。**只读**:不写任何技能、不改任何配置。
|
|
3
|
+
> 技能健康面板(可选)。
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## 你会看到
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
同一个 id 既是 `sidebar.panellist` 的行,也是 keyed `main` 的 key(家族面板契约);
|
|
10
|
-
`label` 由 Kit 以 thunk 提供,跟随语言切换;`order` 取 40 一带(与技能历史相邻)。
|
|
11
|
-
- 三个侧栏面板共用同一份客户端缝和生命周期;业务只提供 Panel/Store/api 和图标。
|
|
7
|
+
`/evolution skills health`;侧栏「技能健康」。
|
|
12
8
|
|
|
13
|
-
##
|
|
9
|
+
## 什么时候会用到
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
- **呈现**:总览四态(ok/warn/error/不可读)+ **按规则聚合**的清单 + 与技能历史/技能目录的交叉跳转;
|
|
17
|
-
`line: …`/`line: UNKNOWN` 两态要写清(未知就是未知 ✓)。
|
|
18
|
-
- **不上屏**:**未标定**的阈值(如 `SUPPORT_SPRAWL_FILES`)**只报规则名、不报数字** ✓ —— 口径冻结之前不许把数字给读者 ✓。
|
|
19
|
-
- 客户端半不直接 import 其它插件的值/类型;座位形状由 `client-kit` 的 seam 唯一定义 ✓。
|
|
11
|
+
你想看结构问题/重复/超长时。
|
|
20
12
|
|
|
21
|
-
##
|
|
13
|
+
## 默认 / 前提
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
完整包里默认关闭。
|
|
16
|
+
|
|
17
|
+
## 边界
|
|
18
|
+
|
|
19
|
+
不修技能,只报告。
|
package/lib/client.js
CHANGED
|
@@ -12,7 +12,7 @@ window.__ModuleLoader__.load({
|
|
|
12
12
|
}
|
|
13
13
|
function injectStyles(doc, css, tagId) {
|
|
14
14
|
if (doc === void 0) return () => {};
|
|
15
|
-
|
|
15
|
+
doc.querySelector("style[data-plugin-css=\"" + tagId + "\"]")?.remove();
|
|
16
16
|
const tag = doc.createElement("style");
|
|
17
17
|
tag.setAttribute("data-plugin-css", tagId);
|
|
18
18
|
tag.textContent = css;
|
package/lib/index.js
CHANGED
|
@@ -61,17 +61,20 @@ function makeSkillHealthRoutes(deps, _audit) {
|
|
|
61
61
|
if (request.method !== "GET") return methodNotAllowed(["GET"]);
|
|
62
62
|
const curator = deps.getCurator();
|
|
63
63
|
const view = curator?.healthView === void 0 ? void 0 : await curator.healthView();
|
|
64
|
-
const
|
|
65
|
-
const
|
|
64
|
+
const scanComplete = Array.isArray(view);
|
|
65
|
+
const rows = scanComplete ? toRouteRows(view) : [];
|
|
66
|
+
const proposalsRead = await deps.getProposals?.();
|
|
67
|
+
const proposals = Array.isArray(proposalsRead) ? proposalsRead : [];
|
|
68
|
+
const proposalStatus = Array.isArray(proposalsRead) ? "available" : "unavailable";
|
|
66
69
|
return json(200, {
|
|
67
70
|
ok: true,
|
|
68
71
|
data: {
|
|
69
72
|
rows,
|
|
70
|
-
truncated:
|
|
73
|
+
truncated: !scanComplete,
|
|
71
74
|
readAt: Date.now(),
|
|
72
|
-
scan: { status:
|
|
75
|
+
scan: { status: scanComplete ? "complete" : "unavailable" },
|
|
73
76
|
proposals,
|
|
74
|
-
proposalStatus
|
|
77
|
+
proposalStatus
|
|
75
78
|
}
|
|
76
79
|
});
|
|
77
80
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
]
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
"version": "0.32.
|
|
14
|
+
"version": "0.32.5",
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
@@ -42,18 +42,18 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
44
44
|
"react": "^18.2.0",
|
|
45
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
46
|
-
"@lmzhen/dsh-evolution-curator": "^0.32.
|
|
45
|
+
"@lmzhen/dsh-evolution-core": "^0.32.5",
|
|
46
|
+
"@lmzhen/dsh-evolution-curator": "^0.32.5"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
50
50
|
"@types/react": "~18.3.1",
|
|
51
51
|
"react": "^18.2.0",
|
|
52
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
53
|
-
"@lmzhen/dsh-evolution-curator": "^0.32.
|
|
52
|
+
"@lmzhen/dsh-evolution-core": "^0.32.5",
|
|
53
|
+
"@lmzhen/dsh-evolution-curator": "^0.32.5"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@lmzhen/dsh-evolution-client-kit": "^0.32.
|
|
56
|
+
"@lmzhen/dsh-evolution-client-kit": "^0.32.5"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|