@lmzhen/dsh-evolution-maintenance 0.3.5 → 0.3.6

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 +5 -1
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -172,7 +172,11 @@ function validateAndNormalizeMaintainPlan(raw, report, validSignals) {
172
172
  if (typeof item.impact !== "string" || !IMPACTS.has(item.impact)) errors.push(`${path}.impact: invalid`);
173
173
  if (!isNonEmptyString(item.impact_reason)) errors.push(`${path}.impact_reason: required`);
174
174
  if (typeof item.reversibility !== "string" || !REVERSIBILITIES.has(item.reversibility)) errors.push(`${path}.reversibility: invalid`);
175
- if (!isNonEmptyString(item.undo_path)) errors.push(`${path}.undo_path: required`);
175
+ if (!isNonEmptyString(item.undo_path)) if (item.reversibility === "none") item.undo_path = "n/a";
176
+ else {
177
+ const rev = typeof item.reversibility === "string" ? item.reversibility : "missing";
178
+ errors.push(`${path}.undo_path: required (reversibility=${rev})`);
179
+ }
176
180
  if (typeof item.confidence !== "number" || !Number.isFinite(item.confidence) || item.confidence < 0 || item.confidence > 1) errors.push(`${path}.confidence: finite number in [0,1] required`);
177
181
  if (typeof item.needs_human !== "boolean") errors.push(`${path}.needs_human: boolean required`);
178
182
  if (typeof item.is_override !== "boolean") errors.push(`${path}.is_override: boolean required`);
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.5",
4
+ "version": "0.3.6",
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.5"
37
+ "@lmzhen/dsh-evolution-core": "^0.3.6"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",