@lmzhen/dsh-evolution-maintenance 0.3.24 → 0.3.25

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 +9 -2
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -110,7 +110,11 @@ function validateAndNormalizeMaintainPlan(raw, report, validSignals) {
110
110
  const errors = [];
111
111
  const forcedHuman = [];
112
112
  const protectedNames = /* @__PURE__ */ new Set();
113
- for (const skill of report.skills) if (skill.protected) protectedNames.add(skill.name);
113
+ const factNames = /* @__PURE__ */ new Set();
114
+ for (const skill of report.skills) {
115
+ if (skill.protected) protectedNames.add(skill.name);
116
+ factNames.add(skill.name);
117
+ }
114
118
  if (!isRecord(raw)) return {
115
119
  ok: false,
116
120
  errors: ["plan root: must be an object"],
@@ -137,7 +141,10 @@ function validateAndNormalizeMaintainPlan(raw, report, validSignals) {
137
141
  }
138
142
  if (typeof item.kind !== "string" || !KINDS.has(item.kind)) errors.push(`${path}.kind: invalid`);
139
143
  if (!Array.isArray(item.names) || item.names.length === 0 || !item.names.every(isNonEmptyString)) errors.push(`${path}.names: non-empty string array required`);
140
- else if (item.names.some((nm) => protectedNames.has(nm))) {
144
+ else if (item.names.some((nm) => !factNames.has(nm))) {
145
+ const missing = item.names.find((nm) => !factNames.has(nm));
146
+ errors.push(`${path}.names: references skill "${String(missing)}" not in the facts report — names must come from the scanned skill set`);
147
+ } else if (item.names.some((nm) => protectedNames.has(nm))) {
141
148
  const hit = item.names.find((nm) => protectedNames.has(nm));
142
149
  errors.push(`${path}.names: references protected skill "${String(hit)}" — §7 forbids recommendations for bundled/hub-installed/pinned skills`);
143
150
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-maintenance",
3
3
  "description": "Deterministic maintenance-scan surface: skill-library snapshot assembly, drift signals and mechanical-facts rendering (design 011) (community build)",
4
- "version": "0.3.24",
4
+ "version": "0.3.25",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "@lmzhen/dsh-evolution-core": "^0.3.24"
37
+ "@lmzhen/dsh-evolution-core": "^0.3.25"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",