@lmzhen/dsh-evolution-commands 0.24.0 → 0.25.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.
Files changed (2) hide show
  1. package/lib/index.js +20 -3
  2. package/package.json +6 -6
package/lib/index.js CHANGED
@@ -2087,9 +2087,26 @@ function apply(ctx, rawConfig = {}) {
2087
2087
  if (!curator) return err(errorText("e-302-curator-service-not-mounted"));
2088
2088
  const [rows, observed] = await Promise.all([curator.healthView(), curator.usageObserved()]);
2089
2089
  const banner = observed ? "" : "使用观测尚未建立 —— 频繁变动(写入幽灵)行已被抑制。";
2090
- const line = (row) => `${row.verdict.padEnd(18)} ${row.name}${row.reasons.length > 0 ? ` — ${row.reasons.join("; ")}` : ""}`;
2091
- if (rows.length === 0) return ok(banner ? `Structure health: all skills healthy. ${banner}` : "Structure health: all skills healthy.");
2092
- return ok([banner ? `Structure health (${rows.length} degraded): ${banner}` : `Structure health (${rows.length} degraded):`, ...rows.map(line)].join("\n"));
2090
+ const line = (row) => {
2091
+ const detail = (row.findings ?? []).map((f) => f.rule + " x" + String(f.count)).join(", ");
2092
+ return row.verdict.padEnd(18) + " " + row.name + (detail === "" ? "" : " — " + detail);
2093
+ };
2094
+ const tally = /* @__PURE__ */ new Map();
2095
+ for (const row of rows) for (const f of row.findings ?? []) {
2096
+ const hit = tally.get(f.rule);
2097
+ if (hit === void 0) tally.set(f.rule, {
2098
+ count: 1,
2099
+ severity: f.severity
2100
+ });
2101
+ else hit.count += 1;
2102
+ }
2103
+ const aggregate = tally.size === 0 ? [] : ["Main causes: " + [...tally.entries()].sort((a, b) => b[1].count - a[1].count).map(([rule, v]) => `${rule} (${v.severity}) x${v.count}`).join(", ")];
2104
+ if (rows.length === 0) return ok(["Structure health: no degraded row was reported (this does NOT assert that every skill is readable).", banner].filter(Boolean).join(" "));
2105
+ return ok([
2106
+ banner ? `Structure health (${rows.length} degraded): ${banner}` : `Structure health (${rows.length} degraded):`,
2107
+ ...aggregate,
2108
+ ...rows.map(line)
2109
+ ].join("\n"));
2093
2110
  }
2094
2111
  if (input === "skills refresh") {
2095
2112
  ctx.emit("evolution/skills-refresh");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-commands",
3
3
  "description": "Human commands for the evolution family (/evolution pending|curator|maintain|doctor) (community build)",
4
- "version": "0.24.0",
4
+ "version": "0.25.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,18 +27,18 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.4",
30
- "@lmzhen/dsh-evolution-approval": "^0.24.0",
31
- "@lmzhen/dsh-evolution-core": "^0.24.0",
32
- "@lmzhen/dsh-evolution-maintenance": "^0.24.0"
30
+ "@lmzhen/dsh-evolution-approval": "^0.25.0",
31
+ "@lmzhen/dsh-evolution-core": "^0.25.0",
32
+ "@lmzhen/dsh-evolution-maintenance": "^0.25.0"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@lmzhen/dsh-evolution-agent-preset": "^0.24.0"
35
+ "@lmzhen/dsh-evolution-agent-preset": "^0.25.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@deepseek-ai/cordis": "^4.0.1",
39
39
  "@deepseek-ai/dsh-commands": "^0.2.0-rc.1",
40
40
  "@deepseek-ai/dsh-llm": "^0.2.0-rc.1",
41
- "@lmzhen/dsh-evolution-io": "^0.24.0"
41
+ "@lmzhen/dsh-evolution-io": "^0.25.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@deepseek-ai/dsh-commands": "^0.2.0-rc.1"