@lmzhen/dsh-evolution-plan-validator 0.3.79 → 0.3.80

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/index.js CHANGED
@@ -190,6 +190,7 @@ function validateSkillOp(op, context, index) {
190
190
  "absorbed_into"
191
191
  ]);
192
192
  if (badField) return `skill op ${index}: field ${badField} must be a string`;
193
+ if (op.replace_all !== void 0 && typeof op.replace_all !== "boolean") return `skill op ${index}: field replace_all must be a boolean`;
193
194
  for (const key of FORBIDDEN_KEYS) if (key in op) return `skill op ${index}: forbidden field ${key}`;
194
195
  const name = (op.name ?? "").trim();
195
196
  if (!name) return `skill op ${index}: name is required`;
@@ -20,6 +20,12 @@ export interface SkillOp {
20
20
  old_string?: string;
21
21
  new_string?: string;
22
22
  file_path?: string;
23
+ /** S1-C1 (0.3.80): patch replaces EVERY occurrence when true — the same
24
+ * contract `skill_manage` documents to the model. Previously the validator
25
+ * neither knew nor rejected this field while the review executor hardcoded
26
+ * first-occurrence-only, so a plan carrying `replace_all` silently shrank
27
+ * to a single replacement and still reported success. */
28
+ replace_all?: boolean;
23
29
  absorbed_into?: string;
24
30
  /** restructure payload: body sections moved to references/ (008 batch B). */
25
31
  restructure?: Array<{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-plan-validator",
3
3
  "description": "Deterministic validator for model-produced evolution plans (community build)",
4
- "version": "0.3.79",
4
+ "version": "0.3.80",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -26,6 +26,6 @@
26
26
  ],
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "@lmzhen/dsh-evolution-core": "^0.3.79"
29
+ "@lmzhen/dsh-evolution-core": "^0.3.80"
30
30
  }
31
31
  }